Commits

Martin Ostrovsky  committed bd28037

added junit to aid in testing

  • Participants
  • Parent commits 5e75b1c

Comments (0)

Files changed (2)

File java/RepustateClientTestJUnit.java

 			assert(sentimentOutputJSON.startsWith("{\"status\": \"OK\""));
 			
 			String sentimentOutputXML = RepustateClient.getAdjectives(RepustateClient.FORMAT_XML, adjDataMap);
-			assertEquals(getXMLStatus(sentimentOutputXML), "OK");			
+			assertEquals("OK", getXMLStatus(sentimentOutputXML));
 			
 			Map<String, String> adjDataMap2 = new HashMap<String, String>();
 			adjDataMap2.put("text", "This is a big block of new text");
 			verbDataMap.put("url", "http://techcrunch.com/2010/05/07/oneriot/");
 			String sentimentOutputXML = RepustateClient.getVerbs(RepustateClient.FORMAT_XML, verbDataMap);
 			String sentimentOutputJSON = RepustateClient.getVerbs(RepustateClient.FORMAT_JSON, verbDataMap);
-			assertEquals(getXMLStatus(sentimentOutputXML), "OK");
+			assertEquals("OK", getXMLStatus(sentimentOutputXML));
 			assert(sentimentOutputJSON.startsWith("{\"status\": \"OK\""));
 			
 			Map<String, String> verbDataMap2 = new HashMap<String, String>();
 		{
 			Map<String, String> powerpointMap = new HashMap<String, String>();
 			powerpointMap.put("slide_1_image", 
-					  		  Base64.encodeFromFile("E:\\Corner\\Workspace\\repustate\\images\\1.jpg"));
+					  		  Base64.encodeFromFile("test_image.jpg"));
 			powerpointMap.put("author", "Test Author");
 			powerpointMap.put("title", "Sample Powerpoint Report Title");
 			powerpointMap.put("slide_1_title", "Slide Title Number1");
 			powerpointMap.put("slide_2_title", "Slide Title Number 2");
 			powerpointMap.put("slide_2_notes", "This is slide number two's notes section");
 			powerpointMap.put("slide_2_image", 
-							  Base64.encodeFromFile("E:\\Corner\\Workspace\\repustate\\images\\2.jpg"));
+					  		  Base64.encodeFromFile("test_image.jpg"));
 			
 			powerpointMap.put("slide_3_title", "Slide Title Number 3");
 			powerpointMap.put("slide_3_notes", "This is slide number three's notes section");
 			powerpointMap.put("slide_3_image", 
-					  		  Base64.encodeFromFile("E:\\Corner\\Workspace\\repustate\\images\\3.jpg"));
+					  		  Base64.encodeFromFile("test_image.jpg"));
 			
 			RepustateClient.savePowerpointSlides(powerpointMap, "a.ppt");
 			

File java/junit-4.10.jar

Binary file added.