Skip to content

Commit

Permalink
Change method of asserting enums (googleapis#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
geri-m committed Oct 31, 2018
1 parent d9ed619 commit 5190cdb
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ public void testParseAnyType() throws Exception {
assertTrue(xml.value.content instanceof XmlEnumTest.AnyEnum);
assertTrue(xml.anyEnum instanceof XmlEnumTest.AnyEnum);
assertTrue(xml.anotherEnum instanceof XmlEnumTest.AnyEnum);
assertTrue(xml.anyEnum.equals(AnyEnum.ENUM_1));
assertTrue(xml.anotherEnum.equals(AnyEnum.ENUM_2));
assertTrue(xml.value.content.equals(AnyEnum.ENUM_1));
assertEquals(xml.anyEnum, AnyEnum.ENUM_1);
assertEquals(xml.anotherEnum, AnyEnum.ENUM_2);
assertEquals(xml.value.content, AnyEnum.ENUM_1);
// serialize
XmlSerializer serializer = Xml.createSerializer();
ByteArrayOutputStream out = new ByteArrayOutputStream();
Expand All @@ -90,11 +90,11 @@ public void testParseToEnumElementTypeWithNestedElement() throws Exception {
}

/**
* Private Method to handle standard parsing and mapping to {@link AnyTypeEnumElementOnly}
* Private Method to handle standard parsing and mapping to {@link AnyTypeEnumElementOnly}.
*
* @param xmlString XML String that needs to be mapped to {@link AnyTypeEnumElementOnly}
* @return returns the serialized string of the XML object
* @throws Exception thrown if there is an issue processing the XML
* @param xmlString XML String that needs to be mapped to {@link AnyTypeEnumElementOnly}.
* @return returns the serialized string of the XML object.
* @throws Exception thrown if there is an issue processing the XML.
*/
private String testStandardXml(final String xmlString) throws Exception {
AnyTypeEnumElementOnly xml = new AnyTypeEnumElementOnly();
Expand All @@ -114,7 +114,7 @@ private String testStandardXml(final String xmlString) throws Exception {
}

/**
* The purpose of this test is to parse an XML attribute to an object's field
* The purpose of this test is to parse an XML attribute to an object's field.
*/
@Test
public void testParse_enumAttributeType() throws Exception {
Expand Down

0 comments on commit 5190cdb

Please sign in to comment.