@Before public void setUp() { path = mock(Path.class); repository = mock(Repository.class); when(repository.getId()).thenReturn(REPOSITORY_ID); sourceRegistry = new InMemorySourceRegistry(); }
@Test public void testRegisterRepositorySources() { sourceRegistry.registerRepositorySources(path, repository); List<Repository> result = sourceRegistry.getAllRepositories(); assertTrue(result.contains(repository)); }
@Before public void setUp() { path = mock(Path.class); repository = mock(Repository.class); when(repository.getId()).thenReturn(REPOSITORY_ID); sourceRegistry = new InMemorySourceRegistry(); }
@Test public void testRegisterRepositorySources() { sourceRegistry.registerRepositorySources(path, repository); List<Repository> result = sourceRegistry.getAllRepositories(); assertTrue(result.contains(repository)); }
@Test public void buildAppAndWaitForMavenOutputTest() throws IOException { final Optional<Source> _source = new GitConfigExecutor(new InMemorySourceRegistry()).apply(new GitConfigImpl(tempPath.getAbsolutePath(), "master", gitUrl,
@Test public void testGetAllRepositories() { List<Repository> repositories = new ArrayList<>(); List<Path> paths = new ArrayList<>(); for (int i = 0; i < REPOSITORIES_SIZE; i++) { paths.add(mock(Path.class)); Repository repository = mock(Repository.class); when(repository.getId()).thenReturn(REPOSITORY_ID + Integer.toString(i)); repositories.add(repository); } for (int i = 0; i < REPOSITORIES_SIZE; i++) { sourceRegistry.registerRepositorySources(paths.get(i), repositories.get(i)); } List<Repository> result = sourceRegistry.getAllRepositories(); assertEquals(repositories.size(), result.size()); for (Repository repository : repositories) { assertTrue(result.contains(repository)); } } }
@Test public void hello() throws Exception { final String repoName = "drools-workshop-build"; final Optional<Source> source = new GitConfigExecutor(new InMemorySourceRegistry()).apply(new GitConfigImpl(tempPath.getAbsolutePath(), "master", gitUrl, repoName, "true")); assertTrue(source.isPresent()); final String targetRepoDir = tempPath.getAbsolutePath() + "/" + repoName + ".git"; Git git = Git.open(new File(targetRepoDir)); assertNotNull(git.getRepository().exactRef(Constants.HEAD)); } }
@Test public void testGetAllRepositories() { List<Repository> repositories = new ArrayList<>(); List<Path> paths = new ArrayList<>(); for (int i = 0; i < REPOSITORIES_SIZE; i++) { paths.add(mock(Path.class)); Repository repository = mock(Repository.class); when(repository.getId()).thenReturn(REPOSITORY_ID + Integer.toString(i)); repositories.add(repository); } for (int i = 0; i < REPOSITORIES_SIZE; i++) { sourceRegistry.registerRepositorySources(paths.get(i), repositories.get(i)); } List<Repository> result = sourceRegistry.getAllRepositories(); assertEquals(repositories.size(), result.size()); for (Repository repository : repositories) { assertTrue(result.contains(repository)); } } }
final Optional<Source> _source = new GitConfigExecutor(new InMemorySourceRegistry()).apply(new GitConfigImpl(tempPath.getAbsolutePath(), "master", "https://github.com/kiegroup/drools-workshop",
final IOServiceNio2WrapperImpl ioService = new IOServiceNio2WrapperImpl(); final Optional<Source> sourceOptional = new GitConfigExecutor(new InMemorySourceRegistry()).apply(new GitConfigImpl(tempPath.getAbsolutePath(), "master", gitUrl,
final Optional<Source> _source = new GitConfigExecutor(new InMemorySourceRegistry()).apply(new GitConfigImpl(tempPath.getAbsolutePath(), "master", "https://github.com/salaboy/drools-workshop",
@Test public void testAPI() { final SourceRegistry sourceRegistry = new InMemorySourceRegistry(); final BuildRegistry buildRegistry = new InMemoryBuildRegistry();
@Test public void testReuseTmpDirectoryAPI() { final SourceRegistry sourceRegistry = new InMemorySourceRegistry(); final BuildRegistry buildRegistry = new InMemoryBuildRegistry();
@Test public void testReuseTmpDirectoryAPI() { final SourceRegistry sourceRegistry = new InMemorySourceRegistry(); final BuildRegistry buildRegistry = new InMemoryBuildRegistry();
@Test public void testAPI() { final SourceRegistry sourceRegistry = new InMemorySourceRegistry(); final BuildRegistry buildRegistry = new InMemoryBuildRegistry();
@Test public void testAPI() throws InterruptedException { final SourceRegistry sourceRegistry = new InMemorySourceRegistry(); final BuildRegistry buildRegistry = new InMemoryBuildRegistry(); final InMemoryRuntimeRegistry runtimeRegistry = new InMemoryRuntimeRegistry();
@Test @InSequence(3) public void testRedeploy() { final SourceRegistry sourceRegistry = new InMemorySourceRegistry(); final BuildRegistry buildRegistry = new InMemoryBuildRegistry(); final InMemoryRuntimeRegistry runtimeRegistry = new InMemoryRuntimeRegistry();
@Test @InSequence(2) public void testAPI() { final SourceRegistry sourceRegistry = new InMemorySourceRegistry(); final BuildRegistry buildRegistry = new InMemoryBuildRegistry(); final InMemoryRuntimeRegistry runtimeRegistry = new InMemoryRuntimeRegistry();
@Test public void testAPI() throws InterruptedException { final SourceRegistry sourceRegistry = new InMemorySourceRegistry(); final BuildRegistry buildRegistry = new InMemoryBuildRegistry(); final InMemoryRuntimeRegistry runtimeRegistry = new InMemoryRuntimeRegistry();