diff --git a/tests/resources/log4j.xml b/tests/resources/log4j.xml deleted file mode 100644 index e3ba85425e..0000000000 --- a/tests/resources/log4j.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/resources/logback-test.xml b/tests/resources/logback-test.xml new file mode 100644 index 0000000000..26f98cbf78 --- /dev/null +++ b/tests/resources/logback-test.xml @@ -0,0 +1,53 @@ + + + + %-5p %d [%t] %c{0}: %m%n + + + INFO + + + + + System.err + + WARN + + + %-5p %d [%t] %c{0}: %m%n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/unit/com/raytheon/uf/common/util/ReflectionUtilTest.java b/tests/unit/com/raytheon/uf/common/util/ReflectionUtilTest.java index c3288f93ec..fd0ba7ff52 100644 --- a/tests/unit/com/raytheon/uf/common/util/ReflectionUtilTest.java +++ b/tests/unit/com/raytheon/uf/common/util/ReflectionUtilTest.java @@ -24,7 +24,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.ArrayList; -import java.util.Collections; import java.util.HashSet; import java.util.List; @@ -39,7 +38,8 @@ import org.junit.Test; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jul 10, 2012 634 djohnson Initial creation + * Jul 10, 2012 634 djohnson Initial creation + * Jul 08, 2013 2173 mpduff Update to work with Java 1.7. * * * @@ -94,7 +94,7 @@ public class ReflectionUtilTest { @Test public void testGetterRetrievesIsPrefixedValue() { - List list = Collections.emptyList(); + List list = new ArrayList(0); boolean value = (Boolean) ReflectionUtil.getter(list, "empty"); diff --git a/tests/unit/com/raytheon/uf/edex/datadelivery/retrieval/LinkStoreTest.java b/tests/unit/com/raytheon/uf/edex/datadelivery/retrieval/LinkStoreTest.java index 47962ebff2..d79b69cd78 100644 --- a/tests/unit/com/raytheon/uf/edex/datadelivery/retrieval/LinkStoreTest.java +++ b/tests/unit/com/raytheon/uf/edex/datadelivery/retrieval/LinkStoreTest.java @@ -42,6 +42,7 @@ import org.junit.Test; * ------------ ---------- ----------- -------------------------- * Jul 26, 2012 955 djohnson Initial creation * Sep 11, 2012 1154 djohnson Test JAXB marshall/unmarshall. + * Jul 08, 2013 2173 mpduff Change to look at xml values, not the xml itself. * * * @@ -97,27 +98,24 @@ public class LinkStoreTest { Writer writer = new StringWriter(); context.createMarshaller().marshal(linkStore, writer); - final String expectedXml = "" - + "" - + "urlOne" - + "" - + ""; - - assertEquals("The marshalled XML did not match what was expected!", - expectedXml, writer.toString()); - LinkStore restored = (LinkStore) context.createUnmarshaller() - .unmarshal( - new StringReader(writer.toString())); + .unmarshal(new StringReader(writer.toString())); + + Link link2 = restored.getLink(LinkStore.getLinkKey(linkStoreLink)); + + assertEquals("Links do not match", link, link2); + + assertEquals("Names do not match", link.getName(), link2.getName()); + + assertEquals("URLs do not match", link.getUrl(), link2.getUrl()); + + assertEquals("Creation Times do not match", + linkStore.getCreationTime(), restored.getCreationTime()); + + assertEquals("Date Strings do not match", linkStore.getDateString(), + restored.getDateString()); + assertEquals("Dates do not match", linkStore.getDate(), + restored.getDate()); assertEquals( "The jaxb unmarshalled version should have been equal to the original!",