package cgeo.geocaching.utils; import junit.framework.TestCase; public class UncertainPropertyTest extends TestCase { public static void testHigherCertaintyWins() throws Exception { final UncertainProperty prop1 = new UncertainProperty("prop1", 10); final UncertainProperty prop2 = new UncertainProperty("prop2", 20); assertEquals(prop2, UncertainProperty.getMergedProperty(prop1, prop2)); } public static void testAvoidNull() throws Exception { final UncertainProperty prop1 = new UncertainProperty("prop1", 10); final UncertainProperty prop2 = new UncertainProperty(null, 20); assertEquals(prop1, UncertainProperty.getMergedProperty(prop1, prop2)); assertEquals(prop1, UncertainProperty.getMergedProperty(prop2, prop1)); } }