@Test public void validate() { when(diagram.getGraph()).thenReturn(graphTestHandler.graph); clientDiagramValidator.validate(diagram, result -> assertTrue(result.stream().anyMatch(v -> Objects.equals(backendViolation, v)))); verify(validationService).validate(diagram); }
@Override public void validate(Diagram diagram, Consumer<Collection<DiagramElementViolation<RuleViolation>>> resultConsumer) { super.validate(diagram, diagramElementViolations -> { final List<DiagramElementViolation<RuleViolation>> violations = (Objects.nonNull(diagramElementViolations) ? new LinkedList<>(diagramElementViolations) : new LinkedList<>()); backendValidation(diagram, backendViolations -> { violations.addAll(backendViolations); resultConsumer.accept(violations); }); }); }
ProjectClientDiagramValidator extends ClientDiagramValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DiagramElementViolation<RuleViolation>>> resultConsumer) { super.validate(diagram, diagramElementViolations -> { final List<DiagramElementViolation<RuleViolation>> violations = (Objects.nonNull(diagramElementViolations) ? new LinkedList<>(diagramElementViolations) : new LinkedList<>()); backendValidation(diagram, backendViolations -> { violations.addAll(backendViolations); resultConsumer.accept(violations); }); }); } }
ProjectClientDiagramValidator extends ClientDiagramValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DiagramElementViolation<RuleViolation>>> resultConsumer) { super.validate(diagram, diagramElementViolations -> { final List<DiagramElementViolation<RuleViolation>> violations = (Objects.nonNull(diagramElementViolations) ? new LinkedList<>(diagramElementViolations) : new LinkedList<>()); backendValidation(diagram, backendViolations -> { violations.addAll(backendViolations); resultConsumer.accept(violations); }); }); } protected  ProjectClientDiagramValidator(); @Inject  ProjectClientDiagramValidator(final DefinitionManager definitionManager,
                                         final RuleManager ruleManager,
                                         final TreeWalkTraverseProcessor treeWalkTraverseProcessor,
                                         final ModelValidator modelValidator,
                                         final Caller<ProjectValidationService> validationService,
                                         final ManagedInstance<DomainValidator> validators); }
ProjectClientDiagramValidator extends ClientDiagramValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DiagramElementViolation<RuleViolation>>> resultConsumer) { super.validate(diagram, diagramElementViolations -> { final List<DiagramElementViolation<RuleViolation>> violations = (Objects.nonNull(diagramElementViolations) ? new LinkedList<>(diagramElementViolations) : new LinkedList<>()); backendValidation(diagram, backendViolations -> { violations.addAll(backendViolations); resultConsumer.accept(violations); }); }); } protected  ProjectClientDiagramValidator(); @Inject  ProjectClientDiagramValidator(final DefinitionManager definitionManager,
                                         final RuleManager ruleManager,
                                         final TreeWalkTraverseProcessor treeWalkTraverseProcessor,
                                         final ModelValidator modelValidator,
                                         final Caller<ProjectValidationService> validationService,
                                         final ManagedInstance<DomainValidator> validators); @Override void validate(Diagram diagram, Consumer<Collection<DiagramElementViolation<RuleViolation>>> resultConsumer); }
ProjectClientDiagramValidator extends ClientDiagramValidator { @Override public void validate(Diagram diagram, Consumer<Collection<DiagramElementViolation<RuleViolation>>> resultConsumer) { super.validate(diagram, diagramElementViolations -> { final List<DiagramElementViolation<RuleViolation>> violations = (Objects.nonNull(diagramElementViolations) ? new LinkedList<>(diagramElementViolations) : new LinkedList<>()); backendValidation(diagram, backendViolations -> { violations.addAll(backendViolations); resultConsumer.accept(violations); }); }); } protected  ProjectClientDiagramValidator(); @Inject  ProjectClientDiagramValidator(final DefinitionManager definitionManager,
                                         final RuleManager ruleManager,
                                         final TreeWalkTraverseProcessor treeWalkTraverseProcessor,
                                         final ModelValidator modelValidator,
                                         final Caller<ProjectValidationService> validationService,
                                         final ManagedInstance<DomainValidator> validators); @Override void validate(Diagram diagram, Consumer<Collection<DiagramElementViolation<RuleViolation>>> resultConsumer);  }