本文整理了Java中org.guvnor.common.services.project.model.Package.getRelativeCaption()
方法的一些代码示例,展示了Package.getRelativeCaption()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Package.getRelativeCaption()
方法的具体详情如下:
包路径:org.guvnor.common.services.project.model.Package
类名称:Package
方法名:getRelativeCaption
暂无
代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-explorer-backend
public FolderItem toFolderItem(final org.guvnor.common.services.project.model.Package pkg) {
if (pkg == null) {
return null;
}
return new FolderItem(pkg,
pkg.getRelativeCaption(),
FolderItemType.FOLDER);
}
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
org.guvnor.common.services.project.model.Package pkg = mock(org.guvnor.common.services.project.model.Package.class);
when(pkg.getRelativeCaption()).thenReturn((String) invocation.getArguments()[1]);
return pkg;
}
});
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend
@Test
public void testGavBasedPackagesSanitized() throws IOException {
String unsanitizedId = "hyphs-and.int.123";
String sanitizedPkgStructure = "hyphs_and/_int/_23/hyphs_and/_int/_23";
POM pom = new POM();
pom.setName("gavBassedPackagesTest");
pom.getGav().setGroupId(unsanitizedId);
pom.getGav().setArtifactId(unsanitizedId);
pom.getGav().setVersion(VERSION);
ArgumentCaptor<Event> eventCaptor = ArgumentCaptor.forClass(Event.class);
doNothing().when(newPackageEvent).fire((NewPackageEvent) eventCaptor.capture());
when(resourceResolver.newPackage(any(org.guvnor.common.services.project.model.Package.class),
anyString(),
anyBoolean()))
.thenAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
org.guvnor.common.services.project.model.Package pkg = mock(org.guvnor.common.services.project.model.Package.class);
when(pkg.getRelativeCaption()).thenReturn((String) invocation.getArguments()[1]);
return pkg;
}
});
runProjecCreationTest(pom);
assertEquals(sanitizedPkgStructure,
((NewPackageEvent) eventCaptor.getValue()).getPackage().getRelativeCaption());
}
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend
defaultPkg.getCaption());
assertEquals("<default>",
defaultPkg.getRelativeCaption());
rootPkg.getCaption());
assertEquals("org",
rootPkg.getRelativeCaption());
kiePkg.getCaption());
assertEquals("kie",
kiePkg.getRelativeCaption());
内容来源于网络,如有侵权,请联系作者删除!