-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #330 from laurentschoelens/jap-9
Fixing issue JAP-9
- Loading branch information
Showing
7 changed files
with
107 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...ests/annotate/src/test/java/org/jvnet/jaxb2_commons/tests/annotate/IssueJAP9TypeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.jvnet.jaxb2_commons.tests.annotate; | ||
|
||
import generated.IssueJAP9Type; | ||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
import javax.xml.bind.annotation.XmlMimeType; | ||
import java.lang.reflect.Field; | ||
|
||
public class IssueJAP9TypeTest { | ||
|
||
@Test | ||
public void testIssueJAP9TypeAField() throws NoSuchFieldException { | ||
String valueInXsd = "[0-9]+\\.[0-9]{1,2}\\.[0-9]{4}\\.[0-9]+"; | ||
IssueJAP9Type type = new IssueJAP9Type(); | ||
Field[] fields = type.getClass().getDeclaredFields(); | ||
XmlMimeType ann = type.getClass().getDeclaredField("a").getAnnotation(XmlMimeType.class); | ||
Assert.assertEquals(valueInXsd, ann.value()); | ||
} | ||
|
||
@Test | ||
public void testIssueJAP9TypeBField() throws NoSuchFieldException { | ||
String valueInXsd = "[0-9]+\\\\.[0-9]{1,2}\\\\.[0-9]{4}\\\\.[0-9]+"; | ||
IssueJAP9Type type = new IssueJAP9Type(); | ||
XmlMimeType ann = type.getClass().getDeclaredField("b").getAnnotation(XmlMimeType.class); | ||
Assert.assertEquals(valueInXsd, ann.value()); | ||
} | ||
|
||
@Test | ||
public void testIssueJAP9TypeCField() throws NoSuchFieldException { | ||
String valueInXsd = "EscapedQuote\"/Here"; | ||
IssueJAP9Type type = new IssueJAP9Type(); | ||
XmlMimeType ann = type.getClass().getDeclaredField("c").getAnnotation(XmlMimeType.class); | ||
Assert.assertEquals(valueInXsd, ann.value()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
...nox/src/main/java/org/jvnet/jaxb/annox/model/annotation/value/XStringAnnotationValue.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters