From d59ab302ba6780da05d4968b4935f8694213934f Mon Sep 17 00:00:00 2001 From: Gerald Madlmayr Date: Tue, 6 Nov 2018 19:16:25 +0100 Subject: [PATCH] Remove irrelevant annotation, clean up test case (#504) --- .../java/com/google/api/client/xml/XmlEnumTest.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java index b5b1eec94..9b0fb58e3 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java @@ -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; @@ -46,7 +47,7 @@ public class XmlEnumTest { "xmlns=\"http://www.w3.org/2005/Atom\">ENUM_2something"; - @SuppressWarnings("cast") + @Test public void testParseAnyType() throws Exception { AnyType xml = new AnyType(); @@ -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);