use of org.uberfire.backend.vfs.Path in project drools-wb by kiegroup.
the class GuidedDecisionTableEditorServiceImplTest method copyCopyToPackage.
@Test
public void copyCopyToPackage() {
final Path path = mock(Path.class);
final String newFileName = "newFileName";
final Path newPackagePath = mock(Path.class);
final String comment = "comment";
service.copy(path, newFileName, newPackagePath, comment);
verify(copyService, times(1)).copy(eq(path), eq(newFileName), eq(newPackagePath), eq(comment));
}
use of org.uberfire.backend.vfs.Path in project drools-wb by kiegroup.
the class GuidedDecisionTableGraphEditorServiceImplTest method checkRename.
@Test
public void checkRename() {
final Path path = mock(Path.class);
final String newFileName = "newFileName";
final String comment = "comment";
service.rename(path, newFileName, comment);
verify(renameService, times(1)).rename(eq(path), eq(newFileName), eq(comment));
}
use of org.uberfire.backend.vfs.Path in project drools-wb by kiegroup.
the class GuidedDecisionTableGraphEditorServiceImplTest method checkConstructContent.
@Test
public void checkConstructContent() {
final Path path = mock(Path.class);
final Overview overview = mock(Overview.class);
when(path.toURI()).thenReturn("default://project/src/main/resources/mypackage/dtable." + dtGraphResourceType.getSuffix());
final GuidedDecisionTableEditorGraphContent content = service.constructContent(path, overview);
verify(resourceOpenedEvent, times(1)).fire(any(ResourceOpenedEvent.class));
assertNotNull(content.getModel());
assertEquals(overview, content.getOverview());
}
use of org.uberfire.backend.vfs.Path in project drools-wb by kiegroup.
the class GuidedDecisionTableGraphEditorServiceImplTest method checkCopy.
@Test
public void checkCopy() {
final Path path = mock(Path.class);
final String newFileName = "newFileName";
final String comment = "comment";
service.copy(path, newFileName, comment);
verify(copyService, times(1)).copy(eq(path), eq(newFileName), eq(comment));
}
use of org.uberfire.backend.vfs.Path in project drools-wb by kiegroup.
the class GuidedDecisionTableGraphEditorServiceImplTest method checkSave.
@Test
@SuppressWarnings("unchecked")
public void checkSave() {
final Path path = mock(Path.class);
final GuidedDecisionTableEditorGraphModel model = new GuidedDecisionTableEditorGraphModel();
final Metadata metadata = mock(Metadata.class);
final String comment = "comment";
when(path.toURI()).thenReturn("default://project/src/main/resources/mypackage/dtable." + dtGraphResourceType.getSuffix());
service.save(path, model, metadata, comment);
verify(ioService, times(1)).write(any(org.uberfire.java.nio.file.Path.class), any(String.class), any(Map.class), any(CommentedOption.class));
}
Aggregations