@Before public void setup() { testFileSystem = new TestFileSystem(); when( configuredRepositories.getRepositoryByRepositoryFileSystem( any( FileSystem.class ) ) ).thenReturn( repository ); inbox = new InboxEntrySecurity( mock( User.class ), mock( AuthorizationManager.class ), mock( OrganizationalUnitService.class ), mock( ProjectService.class ), configuredRepositories ); }
@Before public void setUp() throws Exception { testFileSystem = new TestFileSystem(); solverValidator = testFileSystem.getReference(SolverValidator.class); }
@Before public void setUp() throws Exception { testFileSystem = new TestFileSystem(); validator = testFileSystem.getReference(DefaultGenericKieValidator.class); }
@Before public void setUp() throws Exception { testFileSystem = new TestFileSystem(); saver = new PackageNameWhiteListSaver( ioService, metadataService, commentedOptionFactory ); }
@Before public void setUp() throws Exception { testFileSystem = new TestFileSystem(); doReturn(mock(Module.class)).when(moduleService).resolveModule(any()); service = new POMServiceImpl(ioService, mock(POMContentHandler.class), mock(M2RepoService.class), mock(MetadataService.class), moduleUpdatedEvent, moduleService, mock(CommentedOptionFactory.class), mock(PomEnhancer.class)) { int index = 0; @Override public POM load(Path pomPath) { return new POM("mymodule " + index++, "desctiption", "url", new GAV()); } }; }
@Before public void setUp() throws Exception { testFileSystem = new TestFileSystem(); doReturn(new POM("mymodule", "desctiption", "url", new GAV())).when(pomContentHandler).toModel(any()); doReturn("").when(pomContentHandler).toString(any(), any()); doReturn(mock(Module.class)).when(moduleService).resolveModule(any()); service = new POMServiceImpl(ioService, pomContentHandler, mock(M2RepoService.class), mock(MetadataService.class), moduleUpdatedEvent, moduleService, mock(CommentedOptionFactory.class), mock(PomEnhancer.class)); }
@Before public void setUp() throws Exception { testFileSystem = new TestFileSystem(); doReturn(new POM("mymodule", "desctiption", "url", new GAV())).when(pomContentHandler).toModel(any()); doReturn("").when(pomContentHandler).toString(any(), any()); doReturn(mock(Module.class)).when(moduleService).resolveModule(any()); service = new POMServiceImpl(ioService, pomContentHandler, mock(M2RepoService.class), mock(MetadataService.class), moduleUpdatedEvent, moduleService, mock(CommentedOptionFactory.class), mock(PomEnhancer.class)); }
@Before public void setUp() throws Exception { testFileSystem = new TestFileSystem(); doReturn(mock(Module.class)).when(moduleService).resolveModule(any()); service = new POMServiceImpl(ioService, mock(POMContentHandler.class), mock(M2RepoService.class), mock(MetadataService.class), moduleUpdatedEvent, moduleService, mock(CommentedOptionFactory.class), mock(PomEnhancer.class)) { int index = 0; @Override public POM load(Path pomPath) { return new POM("mymodule " + index++, "desctiption", "url", new GAV()); } }; }
@Before public void setUp() throws Exception { testFileSystem = new TestFileSystem(); moduleService = testFileSystem.getReference(KieModuleService.class); pomService = testFileSystem.getReference(POMService.class); cache = testFileSystem.getReference(LRUBuilderCache.class); deploymentVerifier = new DeploymentVerifier(repositoryResolver, moduleRepositoriesService); buildHelper = spy(new BuildHelper(pomService, m2RepoService, moduleService, deploymentVerifier, cache, handlers, identity)); when(identity.get()).thenReturn(user); when(user.getIdentifier()).thenReturn("test-user"); URL rootUrl = this.getClass().getResource("/BuildHelperTest"); rootPath = Paths.convert(testFileSystem.fileSystemProvider.getPath(rootUrl.toURI())); rootUrl = this.getClass().getResource("/BuildHelperTestSnapshot"); snapshotRootPath = Paths.convert(testFileSystem.fileSystemProvider.getPath(rootUrl.toURI())); Iterator<PostBuildHandler> mockIterator = mock(Iterator.class); when(handlers.iterator()).thenReturn(mockIterator); when(mockIterator.hasNext()).thenReturn(false); }
@Before public void setUp() throws Exception { testFileSystem = new TestFileSystem(); saver = new ProjectScreenModelSaver(pomService, kModuleService, importsService, repositoriesService, whiteListService, ioService, moduleService, repositoryResolver, commentedOptionFactory, pomModelCache); pathToPom = testFileSystem.createTempFile("testproject/pom.xml"); }
@Before public void setUp() throws Exception { disableGitDaemonAndSsh(); fileSystemTestingUtils.setup(); testFileSystem = new TestFileSystem(); validatorBuildService = testFileSystem.getReference(ValidatorBuildService.class); validator = new DefaultGenericKieValidator(validatorBuildService); }