@Test public void searchExistingProjectWith2Words() throws ConnectionException { Collection<Project> results = dive.searchProjects("Xtext viewpoint"); assertNotNull(results); assertFalse(results.isEmpty()); assertEquals(1, results.size()); }
@Test public void getProject() throws ConnectionException { Project project = dive.getProject("torvalds", "linux"); assertNotNull(project); assertTrue(project.getForks() > 0); assertTrue(project.getWatchers() > 0); }
@Test public void searchNonExistingProject() throws ConnectionException { Collection<Project> results = dive.searchProjects("zzzzaaaawwwwwttrzejihkjssjnjk"); assertNotNull(results); assertTrue(results.isEmpty()); }
@Test public void searchExistingProject() throws ConnectionException { Collection<Project> results = dive.searchProjects("play"); assertNotNull(results); assertFalse(results.isEmpty()); }