You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devicemap.apache.org by bd...@apache.org on 2014/01/07 11:47:54 UTC
svn commit: r1556176 -
/incubator/devicemap/trunk/devicemap/java/src/test/java/org/apache/devicemap/client/RefDataTest.java
Author: bdelacretaz
Date: Tue Jan 7 10:47:54 2014
New Revision: 1556176
URL: http://svn.apache.org/r1556176
Log:
DMAP-29 - anomaly count did not match the number of DMAP_JAVA_DIFFERS in test file
Modified:
incubator/devicemap/trunk/devicemap/java/src/test/java/org/apache/devicemap/client/RefDataTest.java
Modified: incubator/devicemap/trunk/devicemap/java/src/test/java/org/apache/devicemap/client/RefDataTest.java
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/devicemap/java/src/test/java/org/apache/devicemap/client/RefDataTest.java?rev=1556176&r1=1556175&r2=1556176&view=diff
==============================================================================
--- incubator/devicemap/trunk/devicemap/java/src/test/java/org/apache/devicemap/client/RefDataTest.java (original)
+++ incubator/devicemap/trunk/devicemap/java/src/test/java/org/apache/devicemap/client/RefDataTest.java Tue Jan 7 10:47:54 2014
@@ -18,7 +18,6 @@
*/
package org.apache.devicemap.client;
-import static org.junit.Assert.fail;
import static org.junit.Assert.assertNotNull;
import java.io.BufferedReader;
@@ -169,23 +168,25 @@ public class RefDataTest {
String idToOuput = null;
if(props == null) {
- anomalySet = ignoredNoEntry;
- idToOuput = TestEntry.DMAP_NO_ID_EXPECTED;
+ if(entry.getId().equals(TestEntry.DMAP_NO_ID_EXPECTED)) {
+ anomalySet = ignoredDifferenceExpected;
+ } else {
+ anomalySet = ignoredNoEntry;
+ idToOuput = TestEntry.DMAP_NO_ID_EXPECTED;
+ }
} else {
final String actual = props.get("id");
assertNotNull("Expecting valid entry", entry.getId());
if(!entry.getId().equals(actual)) {
anomalySet = ignoredNoMatch;
idToOuput = actual;
+ } else if(entry.differs()) {
+ anomalySet = ignoredDifferenceExpected;
}
}
if(anomalySet != null) {
- if(entry.differs()) {
- ignoredDifferenceExpected.add(entry.toString());
- } else {
- anomalySet.add(entry.toString());
- }
+ anomalySet.add(entry.toString());
} else {
successful.add(entry.toString());
}