@Test public void checkNetworkSvcs() throws IOException { Network network = Mockito.mock(Network.class); Mockito.when(network.getId()).thenReturn("network"); Mockito.when(network.getStaticVarCompensatorStream()).thenAnswer(dummy -> Stream.of(svc)); assertTrue(StaticVarCompensatorsValidation.INSTANCE.checkSVCs(network, looseConfig, data)); assertTrue(ValidationType.SVCS.check(network, looseConfig, tmpDir)); ValidationWriter validationWriter = ValidationUtils.createValidationWriter(network.getId(), looseConfig, NullWriter.NULL_WRITER, ValidationType.SVCS); assertTrue(ValidationType.SVCS.check(network, looseConfig, validationWriter)); }
public boolean checkSVCs(Network network, ValidationConfig config, Path file) throws IOException { Objects.requireNonNull(file); Objects.requireNonNull(config); Objects.requireNonNull(file); try (Writer writer = Files.newBufferedWriter(file, StandardCharsets.UTF_8)) { return checkSVCs(network, config, writer); } }
StaticVarCompensatorsValidation { public boolean checkSVCs(Network network, ValidationConfig config, Path file) throws IOException { Objects.requireNonNull(file); Objects.requireNonNull(config); Objects.requireNonNull(file); try (Writer writer = Files.newBufferedWriter(file, StandardCharsets.UTF_8)) { return checkSVCs(network, config, writer); } } }
StaticVarCompensatorsValidation { public boolean checkSVCs(Network network, ValidationConfig config, Path file) throws IOException { Objects.requireNonNull(file); Objects.requireNonNull(config); Objects.requireNonNull(file); try (Writer writer = Files.newBufferedWriter(file, StandardCharsets.UTF_8)) { return checkSVCs(network, config, writer); } } private  StaticVarCompensatorsValidation(); }
StaticVarCompensatorsValidation { public boolean checkSVCs(Network network, ValidationConfig config, Path file) throws IOException { Objects.requireNonNull(file); Objects.requireNonNull(config); Objects.requireNonNull(file); try (Writer writer = Files.newBufferedWriter(file, StandardCharsets.UTF_8)) { return checkSVCs(network, config, writer); } } private  StaticVarCompensatorsValidation(); boolean checkSVCs(Network network, ValidationConfig config, Path file); boolean checkSVCs(Network network, ValidationConfig config, Writer writer); boolean checkSVCs(Network network, ValidationConfig config, ValidationWriter svcsWriter); boolean checkSVCs(StaticVarCompensator svc, ValidationConfig config, Writer writer); boolean checkSVCs(StaticVarCompensator svc, ValidationConfig config, ValidationWriter svcsWriter); boolean checkSVCs(String id, double p, double q, double vControlled, double vController, double nominalVcontroller, double reactivePowerSetpoint, double voltageSetpoint,
                                    RegulationMode regulationMode, double bMin, double bMax, boolean connected, boolean mainComponent,
                                    ValidationConfig config, Writer writer); boolean checkSVCs(String id, double p, double q, double vControlled, double vController, double nominalVcontroller, double reactivePowerSetpoint, double voltageSetpoint,
                                    RegulationMode regulationMode, double bMin, double bMax, boolean connected, boolean mainComponent,
                                    ValidationConfig config, ValidationWriter svcsWriter); }
StaticVarCompensatorsValidation { public boolean checkSVCs(Network network, ValidationConfig config, Path file) throws IOException { Objects.requireNonNull(file); Objects.requireNonNull(config); Objects.requireNonNull(file); try (Writer writer = Files.newBufferedWriter(file, StandardCharsets.UTF_8)) { return checkSVCs(network, config, writer); } } private  StaticVarCompensatorsValidation(); boolean checkSVCs(Network network, ValidationConfig config, Path file); boolean checkSVCs(Network network, ValidationConfig config, Writer writer); boolean checkSVCs(Network network, ValidationConfig config, ValidationWriter svcsWriter); boolean checkSVCs(StaticVarCompensator svc, ValidationConfig config, Writer writer); boolean checkSVCs(StaticVarCompensator svc, ValidationConfig config, ValidationWriter svcsWriter); boolean checkSVCs(String id, double p, double q, double vControlled, double vController, double nominalVcontroller, double reactivePowerSetpoint, double voltageSetpoint,
                                    RegulationMode regulationMode, double bMin, double bMax, boolean connected, boolean mainComponent,
                                    ValidationConfig config, Writer writer); boolean checkSVCs(String id, double p, double q, double vControlled, double vController, double nominalVcontroller, double reactivePowerSetpoint, double voltageSetpoint,
                                    RegulationMode regulationMode, double bMin, double bMax, boolean connected, boolean mainComponent,
                                    ValidationConfig config, ValidationWriter svcsWriter); static final StaticVarCompensatorsValidation INSTANCE; }