Commits

Martin Ostrovsky  committed 2f21f81

removed println call

  • Participants
  • Parent commits fe4d60d

Comments (0)

Files changed (4)

File java/Base64.java

File contents unchanged.

File java/RepustateClient.java

 			String urlStr = NGRAMS_PATH + format;
 			urlStr += URL_ARGUMENT_STRING + url + "&";
 			urlStr += getContentFromMap(data);
-			System.out.println("URL : " + urlStr);
 			output = sendRequest(urlStr, "", "GET", "");
 		}
 		else

File java/RepustateClientTestJUnit.java

 			assert(sentimentOutputJSON.startsWith("{\"status\": \"OK\""));
 			
 			String sentimentOutputXML = RepustateClient.getAdjectives(RepustateClient.FORMAT_XML, adjDataMap);
-			assertEquals("OK", getXMLStatus(sentimentOutputXML));
-			
+			assertEquals(getXMLStatus(sentimentOutputXML), "OK");			
 			Map<String, String> adjDataMap2 = new HashMap<String, String>();
 			adjDataMap2.put("text", "This is a big block of new text");
 			adjDataMap2.put("cloud", "1");
 		{
 			Map<String, String> verbDataMap = new HashMap<String, String>();
 			verbDataMap.put("cloud", "0");
-			verbDataMap.put("url", "http://techcrunch.com/2010/05/07/oneriot/");
+			//verbDataMap.put("url", "http://techcrunch.com/2010/05/07/oneriot/");
+			verbDataMap.put("url", "http://www.crunchbase.com/company/repustate");
 			String sentimentOutputXML = RepustateClient.getVerbs(RepustateClient.FORMAT_XML, verbDataMap);
 			String sentimentOutputJSON = RepustateClient.getVerbs(RepustateClient.FORMAT_JSON, verbDataMap);
-			assertEquals("OK", getXMLStatus(sentimentOutputXML));
+			
+			assertEquals(getXMLStatus(sentimentOutputXML), "OK");
 			assert(sentimentOutputJSON.startsWith("{\"status\": \"OK\""));
 			
 			Map<String, String> verbDataMap2 = new HashMap<String, String>();
 		catch (XPathExpressionException e) 
 		{
 			fail(e.getMessage());
+			e.printStackTrace();
 		}
 	}
 
 	{
 		try
 		{
-			String sentimentOutputXML = RepustateClient.getCleanHTML(RepustateClient.FORMAT_XML, null,  "http://techcrunch.com/2010/05/07/oneriot/");
+			String sentimentOutputXML = RepustateClient.getCleanHTML(RepustateClient.FORMAT_XML, null,  
+												"http://www.crunchbase.com/company/repustate");
 			assertEquals(getXMLStatus(sentimentOutputXML), "OK");
 
-			String sentimentOutputJSON = RepustateClient.getCleanHTML(RepustateClient.FORMAT_JSON, null,  "http://techcrunch.com/2010/05/07/oneriot/");
+			String sentimentOutputJSON = RepustateClient.getCleanHTML(RepustateClient.FORMAT_JSON, null,  
+												"http://www.crunchbase.com/company/repustate");
 			assert(sentimentOutputJSON.startsWith("{\"status\": \"OK\""));
 		}
 		catch (MalformedURLException e) 
 			ngramsDataMap.put("min", "2");
 			ngramsDataMap.put("freq", "2");
 			ngramsDataMap.put("stopwords", "1");
-			String sentimentOutputXML = RepustateClient.getNgrams(RepustateClient.FORMAT_XML, ngramsDataMap, "http://techcrunch.com/2010/05/07/oneriot/");
+			String sentimentOutputXML = RepustateClient.getNgrams(RepustateClient.FORMAT_XML, ngramsDataMap, "http://www.crunchbase.com/company/repustate");
+			
 			assertEquals(getXMLStatus(sentimentOutputXML), "OK");
 
-			String sentimentOutputJSON = RepustateClient.getNgrams(RepustateClient.FORMAT_JSON, ngramsDataMap, "http://techcrunch.com/2010/05/07/oneriot/");
+			String sentimentOutputJSON = RepustateClient.getNgrams(RepustateClient.FORMAT_JSON, ngramsDataMap, "http://www.crunchbase.com/company/repustate");
 			assert(sentimentOutputJSON.startsWith("{\"status\": \"OK\""));
 			
 			//Test 2 : No url, but text only
 			ngramsDataMap2.put("min", "2");
 			ngramsDataMap2.put("freq", "2");
 			ngramsDataMap2.put("stopwords", "1");
-			ngramsDataMap2.put("text", "Today, OneRiot is rolling out a major revamp of both its site and some of its underlying architecture. T" +
-										"he site itself looks much nicer and is better organized (sort of like a realtime Techmeme, in a way), but" +
-										" OneRiot�s site is just a fraction of what they do. That�s why the underlying architecture elements are much " +
-										"more interesting. In particular, OneRiot is today launching a new Trending Topics Engine, which it says is " +
-										"the fastest and most complete way to find the best things being shared on the web.");
+			ngramsDataMap2.put("text", "Today, OneRiot is rolling out a major revamp of both " +
+										"its site and some of its underlying architecture");
 			
 			String sentimentOutputXML2 = RepustateClient.getNgrams(RepustateClient.FORMAT_XML, ngramsDataMap2, null);
 			assertEquals(getXMLStatus(sentimentOutputXML2), "OK");
 		} 
 		catch (IOException e) 
 		{
+			e.printStackTrace();
 			fail(e.getMessage());
 		} 
 		catch (RepustateException e) 
 		} 
 		catch (XPathExpressionException e) 
 		{
+			e.printStackTrace();
 			fail(e.getMessage());
 		}
 	}
 			powerpointMap.put("slide_3_image", 
 					  		  Base64.encodeFromFile("test_image.jpg"));
 			
-			RepustateClient.savePowerpointSlides(powerpointMap, "a.ppt");
+			RepustateClient.savePowerpointSlides(powerpointMap, "repustate_test.ppt");
 			
 			assertNotNull(new File("a.ppt"));
 		}

File java/RepustateException.java

File contents unchanged.