Skip to content

Commit

Permalink
Remove irrelevant annotation, clean up test case (googleapis#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
geri-m committed Nov 6, 2018
1 parent 714fd2b commit d59ab30
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package com.google.api.client.xml;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.ByteArrayOutputStream;
Expand Down Expand Up @@ -46,7 +47,7 @@ public class XmlEnumTest {
"xmlns=\"http://www.w3.org/2005/Atom\"><elementEnum>ENUM_2<nested>something</nested" +
"></elementEnum></any>";

@SuppressWarnings("cast")

@Test
public void testParseAnyType() throws Exception {
AnyType xml = new AnyType();
Expand All @@ -57,10 +58,10 @@ public void testParseAnyType() throws Exception {
assertTrue(xml.attr instanceof String);
assertTrue(xml.elem.toString(), xml.elem instanceof ArrayList<?>);
assertTrue(xml.rep.toString(), xml.rep instanceof ArrayList<?>);
assertTrue(xml.value instanceof ValueType);
assertTrue(xml.value.content instanceof XmlEnumTest.AnyEnum);
assertTrue(xml.anyEnum instanceof XmlEnumTest.AnyEnum);
assertTrue(xml.anotherEnum instanceof XmlEnumTest.AnyEnum);
assertNotNull(xml.value);
assertNotNull(xml.value.content);
assertNotNull(xml.anyEnum);
assertNotNull(xml.anotherEnum);
assertEquals(xml.anyEnum, AnyEnum.ENUM_1);
assertEquals(xml.anotherEnum, AnyEnum.ENUM_2);
assertEquals(xml.value.content, AnyEnum.ENUM_1);
Expand Down

0 comments on commit d59ab30

Please sign in to comment.