@Test public void testPostProcess() { helper.postProcess(originalPath, destinationPath); verify(ioService).readAllString(any()); verify(serializer).deserialize(anyString()); verify(serializer).serialize(eq(formDefinition)); verifyForm(formDefinition); verify(commentedOptionFactory).makeCommentedOption(anyString()); ioService.write(any(), anyString(), any()); }
public void postProcess(Path source, Path destination) { org.uberfire.java.nio.file.Path destinationNioPath = Paths.convert(destination); FormDefinition formDefinition = serializer.deserialize(ioService.readAllString(destinationNioPath)); processFormDefinition(formDefinition, destination); ioService.write(destinationNioPath, serializer.serialize(formDefinition), commentedOptionFactory.makeCommentedOption("Updating form [" + destination.toURI() + "].")); }
AbstractFormDefinitionHelper { public void postProcess(Path source, Path destination) { org.uberfire.java.nio.file.Path destinationNioPath = Paths.convert(destination); FormDefinition formDefinition = serializer.deserialize(ioService.readAllString(destinationNioPath)); processFormDefinition(formDefinition, destination); ioService.write(destinationNioPath, serializer.serialize(formDefinition), commentedOptionFactory.makeCommentedOption("Updating form [" + destination.toURI() + "].")); } }
AbstractFormDefinitionHelper { public void postProcess(Path source, Path destination) { org.uberfire.java.nio.file.Path destinationNioPath = Paths.convert(destination); FormDefinition formDefinition = serializer.deserialize(ioService.readAllString(destinationNioPath)); processFormDefinition(formDefinition, destination); ioService.write(destinationNioPath, serializer.serialize(formDefinition), commentedOptionFactory.makeCommentedOption("Updating form [" + destination.toURI() + "].")); } AbstractFormDefinitionHelper(FormDefinitionSerializer serializer, IOService ioService, CommentedOptionFactory commentedOptionFactory); }
AbstractFormDefinitionHelper { public void postProcess(Path source, Path destination) { org.uberfire.java.nio.file.Path destinationNioPath = Paths.convert(destination); FormDefinition formDefinition = serializer.deserialize(ioService.readAllString(destinationNioPath)); processFormDefinition(formDefinition, destination); ioService.write(destinationNioPath, serializer.serialize(formDefinition), commentedOptionFactory.makeCommentedOption("Updating form [" + destination.toURI() + "].")); } AbstractFormDefinitionHelper(FormDefinitionSerializer serializer, IOService ioService, CommentedOptionFactory commentedOptionFactory); boolean supports(Path path); void postProcess(Path source, Path destination); }
AbstractFormDefinitionHelper { public void postProcess(Path source, Path destination) { org.uberfire.java.nio.file.Path destinationNioPath = Paths.convert(destination); FormDefinition formDefinition = serializer.deserialize(ioService.readAllString(destinationNioPath)); processFormDefinition(formDefinition, destination); ioService.write(destinationNioPath, serializer.serialize(formDefinition), commentedOptionFactory.makeCommentedOption("Updating form [" + destination.toURI() + "].")); } AbstractFormDefinitionHelper(FormDefinitionSerializer serializer, IOService ioService, CommentedOptionFactory commentedOptionFactory); boolean supports(Path path); void postProcess(Path source, Path destination);  }