Search in sources :

Example 1 with MockURIBuilder

use of net.nemerosa.ontrack.ui.controller.MockURIBuilder in project ontrack by nemerosa.

the class AbstractResourceTest method before.

@Before
public void before() {
    securityService = Mockito.mock(SecurityService.class);
    mapper = new ResourceObjectMapperFactory().resourceObjectMapper(Collections.emptyList(), new DefaultResourceContext(new MockURIBuilder(), securityService));
}
Also used : SecurityService(net.nemerosa.ontrack.model.security.SecurityService) MockURIBuilder(net.nemerosa.ontrack.ui.controller.MockURIBuilder) Before(org.junit.Before)

Example 2 with MockURIBuilder

use of net.nemerosa.ontrack.ui.controller.MockURIBuilder in project ontrack by nemerosa.

the class MetaInfoSearchExtensionTest method before.

@Before
public void before() {
    propertyService = mock(PropertyService.class);
    StructureService structureService = mock(StructureService.class);
    extension = new MetaInfoSearchExtension(new GeneralExtensionFeature(), new MockURIBuilder(), propertyService, structureService);
}
Also used : MockURIBuilder(net.nemerosa.ontrack.ui.controller.MockURIBuilder) PropertyService(net.nemerosa.ontrack.model.structure.PropertyService) StructureService(net.nemerosa.ontrack.model.structure.StructureService) Before(org.junit.Before)

Example 3 with MockURIBuilder

use of net.nemerosa.ontrack.ui.controller.MockURIBuilder in project ontrack by nemerosa.

the class BuildLinkSearchExtensionTest method before.

@Before
public void before() {
    StructureService structureService = mock(StructureService.class);
    extension = new BuildLinkSearchExtension(new GeneralExtensionFeature(), new MockURIBuilder(), structureService);
}
Also used : MockURIBuilder(net.nemerosa.ontrack.ui.controller.MockURIBuilder) StructureService(net.nemerosa.ontrack.model.structure.StructureService) Before(org.junit.Before)

Example 4 with MockURIBuilder

use of net.nemerosa.ontrack.ui.controller.MockURIBuilder in project ontrack by nemerosa.

the class CoreResourceModuleTest method before.

@Before
public void before() {
    securityService = mock(SecurityService.class);
    structureService = mock(StructureService.class);
    ResourceDecorationContributorService resourceDecorationContributorService = mock(ResourceDecorationContributorService.class);
    projectFavouriteService = mock(ProjectFavouriteService.class);
    mapper = new ResourceObjectMapperFactory().resourceObjectMapper(Collections.singletonList(new DefaultResourceModule(Arrays.asList(new ConnectedAccountResourceDecorator(), new ProjectResourceDecorator(resourceDecorationContributorService, projectFavouriteService), new BranchResourceDecorator(resourceDecorationContributorService, structureService), new PromotionLevelResourceDecorator(), new ValidationStampResourceDecorator(), new BuildResourceDecorator(resourceDecorationContributorService), new PromotionRunResourceDecorator(), new ValidationRunResourceDecorator(), new BuildFilterResourceDecorator(), new AccountResourceDecorator(), new AccountGroupResourceDecorator(), new GlobalPermissionResourceDecorator(), new ProjectPermissionResourceDecorator(), new JobStatusResourceDecorator(), new PredefinedValidationStampResourceDecorator()))), new DefaultResourceContext(new MockURIBuilder(), securityService));
}
Also used : MockURIBuilder(net.nemerosa.ontrack.ui.controller.MockURIBuilder) Before(org.junit.Before)

Example 5 with MockURIBuilder

use of net.nemerosa.ontrack.ui.controller.MockURIBuilder in project ontrack by nemerosa.

the class GitChangeLogResourceDecoratorTest method before.

@Before
public void before() {
    SecurityService securityService = mock(SecurityService.class);
    gitService = mock(GitService.class);
    mapper = new ResourceObjectMapperFactory().resourceObjectMapper(new DefaultResourceContext(new MockURIBuilder(), securityService), new GitChangeLogResourceDecorator(gitService));
}
Also used : SecurityService(net.nemerosa.ontrack.model.security.SecurityService) MockURIBuilder(net.nemerosa.ontrack.ui.controller.MockURIBuilder) GitService(net.nemerosa.ontrack.extension.git.service.GitService) DefaultResourceContext(net.nemerosa.ontrack.ui.resource.DefaultResourceContext) ResourceObjectMapperFactory(net.nemerosa.ontrack.ui.resource.ResourceObjectMapperFactory) Before(org.junit.Before)

Aggregations

MockURIBuilder (net.nemerosa.ontrack.ui.controller.MockURIBuilder)5 Before (org.junit.Before)5 SecurityService (net.nemerosa.ontrack.model.security.SecurityService)2 StructureService (net.nemerosa.ontrack.model.structure.StructureService)2 GitService (net.nemerosa.ontrack.extension.git.service.GitService)1 PropertyService (net.nemerosa.ontrack.model.structure.PropertyService)1 DefaultResourceContext (net.nemerosa.ontrack.ui.resource.DefaultResourceContext)1 ResourceObjectMapperFactory (net.nemerosa.ontrack.ui.resource.ResourceObjectMapperFactory)1