Skip to content

Commit

Permalink
Issue #1.
Browse files Browse the repository at this point in the history
  • Loading branch information
highsource committed Oct 1, 2014
1 parent 20f5107 commit 070173a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/issues/src/main/resources/schema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@
</xs:sequence>
</xs:complexType>

<xs:complexType name="ghIssue4" mixed="true">
<xs:complexType name="gh1" mixed="true">
<xs:sequence>
<xs:element name="a" type="xs:string">
<xs:annotation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
import org.junit.Assert;
import org.junit.Test;

public class GhIssue4Test {
public class Gh1Test {

@Test
public void contextIsSuccessfullyCreated() throws JAXBException {
final JAXBContext context = JAXBContext.newInstance(GhIssue4.class);
final GhIssue4 value = new GhIssue4();
final JAXBContext context = JAXBContext.newInstance(Gh1.class);
final Gh1 value = new Gh1();
value.getA().add("a");
value.getB().add(2);
value.getcontent().add("Test");

final StringWriter sw = new StringWriter();
context.createMarshaller().marshal(
new JAXBElement<GhIssue4>(new QName("test"), GhIssue4.class,
value), sw);
Assert.assertTrue(sw.toString().endsWith(
"<test><a>a</a><b>2</b>Test</test>"));
new JAXBElement<Gh1>(new QName("test"), Gh1.class, value), System.out);
context.createMarshaller().marshal(
new JAXBElement<Gh1>(new QName("test"), Gh1.class, value), sw);
Assert.assertTrue(sw.toString().contains("Test"));
}
}

0 comments on commit 070173a

Please sign in to comment.