DecisionTableXLSServiceImpl extends KieService<DecisionTableXLSContent> implements DecisionTableXLSService,
                   ExtendedDecisionTableXLSService { @Override public Path create(final Path resource, final InputStream content, final String sessionId, final String comment) { return writeToFile(resource, content, sessionId, comment, true); } DecisionTableXLSServiceImpl(); @Inject  DecisionTableXLSServiceImpl(@Named("ioStrategy") final IOService ioService,
                                       final CopyService copyService,
                                       final DeleteService deleteService,
                                       final RenameService renameService,
                                       final Event<ResourceOpenedEvent> resourceOpenedEvent,
                                       final DecisionTableXLSConversionService conversionService,
                                       final GenericValidator genericValidator,
                                       final CommentedOptionFactory commentedOptionFactory,
                                       final AuthenticationService authenticationService); @Override DecisionTableXLSContent loadContent(final Path path); @Override InputStream load(final Path path,
                            final String sessionId); @Override Path create(final Path resource,
                       final InputStream content,
                       final String sessionId,
                       final String comment); @Override Path save(final Path resource,
                     final InputStream content,
                     final String sessionId,
                     final String comment); @Override String getSource(final Path path); @Override void delete(final Path path,
                       final String comment); @Override Path rename(final Path path,
                       final String newName,
                       final String comment); @Override Path copy(final Path path,
                     final String newName,
                     final String comment); @Override Path copy(final Path path,
                     final String newName,
                     final Path targetDirectory,
                     final String comment); @Override ConversionResult convert(final Path path); @Override List<ValidationMessage> validate(final Path path,
                                            final Path resource);  }
@Test public void testSessionInfoOnCreate() { when(ioService.write(any(org.uberfire.java.nio.file.Path.class), any(byte[].class), commentedOptionArgumentCaptor.capture())).thenReturn(null); this.service = getServiceWithValidationOverride((tempFile) -> { }); service.create(path, inputstream, sessionId, comment); assertCommentedOption(); }
@Test public void testInvalidTableNotCreated() throws IOException { when(ioService.write(any(org.uberfire.java.nio.file.Path.class), any(byte[].class), commentedOptionArgumentCaptor.capture())).thenReturn(null); testInvalidTable((s) -> s.create(path, inputstream, sessionId, comment)); }