@Test public void checkNetworkShunts() throws IOException { Network network = Mockito.mock(Network.class); Mockito.when(network.getId()).thenReturn("network"); Mockito.when(network.getShuntCompensatorStream()).thenAnswer(dummy -> Stream.of(shunt)); assertTrue(ShuntCompensatorsValidation.INSTANCE.checkShunts(network, strictConfig, data)); assertTrue(ValidationType.SHUNTS.check(network, strictConfig, tmpDir)); ValidationWriter validationWriter = ValidationUtils.createValidationWriter(network.getId(), strictConfig, NullWriter.NULL_WRITER, ValidationType.SHUNTS); assertTrue(ValidationType.SHUNTS.check(network, strictConfig, validationWriter)); }
public boolean checkShunts(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 checkShunts(network, config, writer); } }
ShuntCompensatorsValidation { public boolean checkShunts(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 checkShunts(network, config, writer); } } }
ShuntCompensatorsValidation { public boolean checkShunts(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 checkShunts(network, config, writer); } } private  ShuntCompensatorsValidation(); }
ShuntCompensatorsValidation { public boolean checkShunts(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 checkShunts(network, config, writer); } } private  ShuntCompensatorsValidation(); boolean checkShunts(Network network, ValidationConfig config, Path file); boolean checkShunts(Network network, ValidationConfig config, Writer writer); boolean checkShunts(Network network, ValidationConfig config, ValidationWriter shuntsWriter); boolean checkShunts(ShuntCompensator shunt, ValidationConfig config, Writer writer); boolean checkShunts(ShuntCompensator shunt, ValidationConfig config, ValidationWriter shuntsWriter); boolean checkShunts(String id, double p, double q, int currentSectionCount, int maximumSectionCount, double bPerSection,
                               double v, double qMax, double nominalV, boolean connected, boolean mainComponent, ValidationConfig config,
                               Writer writer); boolean checkShunts(String id, double p, double q, int currentSectionCount, int maximumSectionCount, double bPerSection,
                               double v, double qMax, double nominalV, boolean connected, boolean mainComponent, ValidationConfig config,
                               ValidationWriter shuntsWriter); }
ShuntCompensatorsValidation { public boolean checkShunts(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 checkShunts(network, config, writer); } } private  ShuntCompensatorsValidation(); boolean checkShunts(Network network, ValidationConfig config, Path file); boolean checkShunts(Network network, ValidationConfig config, Writer writer); boolean checkShunts(Network network, ValidationConfig config, ValidationWriter shuntsWriter); boolean checkShunts(ShuntCompensator shunt, ValidationConfig config, Writer writer); boolean checkShunts(ShuntCompensator shunt, ValidationConfig config, ValidationWriter shuntsWriter); boolean checkShunts(String id, double p, double q, int currentSectionCount, int maximumSectionCount, double bPerSection,
                               double v, double qMax, double nominalV, boolean connected, boolean mainComponent, ValidationConfig config,
                               Writer writer); boolean checkShunts(String id, double p, double q, int currentSectionCount, int maximumSectionCount, double bPerSection,
                               double v, double qMax, double nominalV, boolean connected, boolean mainComponent, ValidationConfig config,
                               ValidationWriter shuntsWriter); static final ShuntCompensatorsValidation INSTANCE; }