import java.io.IOException;
import java.io.OutputStreamWriter;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import static org
.junit
.Assert.*;
public class PageRankServiceTest {
public PageRankServiceTest() {
}
@BeforeClass
public static void setUpClass() throws Exception {
}
@AfterClass
public static void tearDownClass() throws Exception {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
/**
* Test of getFirstMatch method, of class PageRankService.
*/
@Test
@Ignore
public void testGetFirstMatch() {
System.out
.println
("getFirstMatch"); String searchPattern = "";
String textString = "";
int expResult = 0;
int result = PageRankService.getFirstMatch(searchPattern, textString);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
// fail("The test case is a prototype.");
}
@Test
public void testfromWhysoft() {
System.out
.println
("getPageRank"); String url = "http://s...content-available-to-author-only...s.hu";
int expResult = 0;
try {
URL url2 = new URL("http://s...content-available-to-author-only...s.hu:80");
URLConnection conn;
conn = url2.openConnection();
conn.setDoOutput(true);
System.out
.println
(conn
.getOutputStream
()); //OutputStreamWriter wr = new OutputStreamWriter();
} catch(MalformedURLException me){
}catch (IOException ex) {
Logger
.getLogger
(PageRankServiceTest
.class.getName
()).log(Level
.SEVERE
, null, ex
); }
}
}