devicemap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wk...@apache.org
Subject svn commit: r1666695 - /devicemap/trunk/devicemap/java/simpleddr/src/test/java/org/apache/devicemap/simpleddr/test/DDRTestRunner.java
Date Sat, 14 Mar 2015 15:44:40 GMT
Author: wkeil
Date: Sat Mar 14 15:44:39 2015
New Revision: 1666695

URL: http://svn.apache.org/r1666695
Log:
DMAP-147: Apply W3C DDRSimpleAPITester 
Updated test arguments
Task-Url: https://issues.apache.org/jira/browse/DMAP-147

Modified:
    devicemap/trunk/devicemap/java/simpleddr/src/test/java/org/apache/devicemap/simpleddr/test/DDRTestRunner.java

Modified: devicemap/trunk/devicemap/java/simpleddr/src/test/java/org/apache/devicemap/simpleddr/test/DDRTestRunner.java
URL: http://svn.apache.org/viewvc/devicemap/trunk/devicemap/java/simpleddr/src/test/java/org/apache/devicemap/simpleddr/test/DDRTestRunner.java?rev=1666695&r1=1666694&r2=1666695&view=diff
==============================================================================
--- devicemap/trunk/devicemap/java/simpleddr/src/test/java/org/apache/devicemap/simpleddr/test/DDRTestRunner.java
(original)
+++ devicemap/trunk/devicemap/java/simpleddr/src/test/java/org/apache/devicemap/simpleddr/test/DDRTestRunner.java
Sat Mar 14 15:44:39 2015
@@ -1,5 +1,7 @@
 package org.apache.devicemap.simpleddr.test;
 
+import java.util.Hashtable;
+
 import org.w3c.ddr.simple.Evidence;
 
 import test.DDRSimpleAPITester;
@@ -10,6 +12,23 @@ public class DDRTestRunner {
 		final String nexusUA = "Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/FRF91)
AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1";
         final String iri = "http://www.w3.org/2008/01/ddr-core-vocabulary";
 		final Evidence uaEvidence = new UserAgentEvidence(nexusUA);
-//		final DDRSimpleAPITester tester = new DDRSimpleAPITester(DeviceMapService.DEVICEMAP_SERVICE,
uaEvidence, iri);
+		final DDRSimpleAPITester tester = new DDRSimpleAPITester(DeviceMapService.DEVICEMAP_SERVICE,
uaEvidence, 
+				iri, "", "", 
+				0, 
+				"", "", "", "", "", "", "",
+				1,
+				"", "",
+				false,
+				"", "",
+				new String[] {""}
+				);
+		Hashtable<?, ?> report = tester.getReport();
+		if (report.size() > 0) {
+			System.out.println(report.size() + " entries found.");
+			for (Object key : report.keySet()) {
+				System.out.println("Key: " + key + "; " + "Value: " + report.get(key));
+			}
+		}
+		
 	}
 }



Mime
View raw message