use of org.kie.workbench.common.services.shared.allowlist.AllowList in project kie-wb-common by kiegroup.
the class ProjectScreenModelLoaderTest method testAllowList.
@Test
public void testAllowList() throws Exception {
final AllowList allowList = new AllowList();
when(allowListService.load(packageNamesAllowListPath)).thenReturn(allowList);
final Metadata metadata = new Metadata();
when(metadataService.getMetadata(packageNamesAllowListPath)).thenReturn(metadata);
ProjectScreenModel model = loader.load(pathToPom);
assertEquals(packageNamesAllowListPath, model.getPathToAllowList());
assertEquals(allowList, model.getAllowList());
assertEquals(metadata, model.getAllowListMetaData());
}
use of org.kie.workbench.common.services.shared.allowlist.AllowList in project kie-wb-common by kiegroup.
the class ProjectScreenModelLoaderTest method testAllowListNoMetadata.
@Test
public void testAllowListNoMetadata() throws Exception {
final AllowList allowList = new AllowList();
testFileSystem.deleteFile(packageNamesAllowListPath);
when(allowListService.load(packageNamesAllowListPath)).thenReturn(allowList);
ProjectScreenModel model = loader.load(pathToPom);
assertEquals(packageNamesAllowListPath, model.getPathToAllowList());
assertEquals(allowList, model.getAllowList());
assertNotNull(model.getAllowListMetaData());
}
Aggregations