use of org.guvnor.common.services.project.model.WorkspaceProject in project kie-wb-common by kiegroup.
the class SocialEventModuleConstraintTest method hasNoRestrictionsForOtherSocialEventsTest.
@Test
public void hasNoRestrictionsForOtherSocialEventsTest() throws Exception {
final WorkspaceProject project = mock(WorkspaceProject.class);
eventProject = project;
final SocialActivitiesEvent customEventOtherType = new SocialActivitiesEvent(socialUser, "type", new Date()).withLink("link", "link", SocialActivitiesEvent.LINK_TYPE.CUSTOM);
assertFalse(socialEventModuleConstraint.hasRestrictions(customEventOtherType));
}
use of org.guvnor.common.services.project.model.WorkspaceProject in project kie-wb-common by kiegroup.
the class KieServiceTest method testProjectName.
@Test
public void testProjectName() throws Exception {
final KieModule module = mock(KieModule.class);
doReturn(module).when(kieService.moduleService).resolveModule(any(Path.class));
final WorkspaceProject project = mock(WorkspaceProject.class);
doReturn("test name").when(project).getName();
doReturn(project).when(kieService.projectService).resolveProject(any(Path.class));
final TestModel testModel = kieService.loadContent(Paths.convert(mainFilePath));
assertEquals("test name", testModel.overview.getProjectName());
}
Aggregations