@Test public void checkGenerators() { assertTrue(GeneratorsValidation.INSTANCE.checkGenerators(generator, strictConfig, NullWriter.NULL_WRITER)); Mockito.when(genTerminal.getP()).thenReturn(-39.8); assertFalse(GeneratorsValidation.INSTANCE.checkGenerators(generator, strictConfig, NullWriter.NULL_WRITER)); Mockito.when(genBusView.getBus()).thenReturn(null); assertTrue(GeneratorsValidation.INSTANCE.checkGenerators(generator, strictConfig, NullWriter.NULL_WRITER)); }
public boolean checkGenerators(Network network, ValidationConfig config, Path file) throws IOException { Objects.requireNonNull(network); Objects.requireNonNull(config); Objects.requireNonNull(file); try (Writer writer = Files.newBufferedWriter(file, StandardCharsets.UTF_8)) { return checkGenerators(network, config, writer); } }
GeneratorsValidation { public boolean checkGenerators(Network network, ValidationConfig config, Path file) throws IOException { Objects.requireNonNull(network); Objects.requireNonNull(config); Objects.requireNonNull(file); try (Writer writer = Files.newBufferedWriter(file, StandardCharsets.UTF_8)) { return checkGenerators(network, config, writer); } } }
GeneratorsValidation { public boolean checkGenerators(Network network, ValidationConfig config, Path file) throws IOException { Objects.requireNonNull(network); Objects.requireNonNull(config); Objects.requireNonNull(file); try (Writer writer = Files.newBufferedWriter(file, StandardCharsets.UTF_8)) { return checkGenerators(network, config, writer); } } private  GeneratorsValidation(); }
GeneratorsValidation { public boolean checkGenerators(Network network, ValidationConfig config, Path file) throws IOException { Objects.requireNonNull(network); Objects.requireNonNull(config); Objects.requireNonNull(file); try (Writer writer = Files.newBufferedWriter(file, StandardCharsets.UTF_8)) { return checkGenerators(network, config, writer); } } private  GeneratorsValidation(); boolean checkGenerators(Network network, ValidationConfig config, Path file); boolean checkGenerators(Network network, ValidationConfig config, Writer writer); boolean checkGenerators(Network network, ValidationConfig config, ValidationWriter generatorsWriter); boolean checkGenerators(Generator gen, ValidationConfig config, Writer writer); boolean checkGenerators(Generator gen, ValidationConfig config, ValidationWriter generatorsWriter, BalanceTypeGuesser guesser); boolean checkGenerators(String id, double p, double q, double v, double targetP, double targetQ, double targetV,
                                          boolean voltageRegulatorOn, double minP, double maxP, double minQ, double maxQ, boolean connected,
                                          boolean mainComponent, ValidationConfig config, Writer writer); boolean checkGenerators(String id, double p, double q, double v, double targetP, double targetQ, double targetV,
                                          boolean voltageRegulatorOn, double minP, double maxP, double minQ, double maxQ, boolean connected,
                                          boolean mainComponent, ValidationConfig config, ValidationWriter generatorsWriter, BalanceTypeGuesser guesser); }
GeneratorsValidation { public boolean checkGenerators(Network network, ValidationConfig config, Path file) throws IOException { Objects.requireNonNull(network); Objects.requireNonNull(config); Objects.requireNonNull(file); try (Writer writer = Files.newBufferedWriter(file, StandardCharsets.UTF_8)) { return checkGenerators(network, config, writer); } } private  GeneratorsValidation(); boolean checkGenerators(Network network, ValidationConfig config, Path file); boolean checkGenerators(Network network, ValidationConfig config, Writer writer); boolean checkGenerators(Network network, ValidationConfig config, ValidationWriter generatorsWriter); boolean checkGenerators(Generator gen, ValidationConfig config, Writer writer); boolean checkGenerators(Generator gen, ValidationConfig config, ValidationWriter generatorsWriter, BalanceTypeGuesser guesser); boolean checkGenerators(String id, double p, double q, double v, double targetP, double targetQ, double targetV,
                                          boolean voltageRegulatorOn, double minP, double maxP, double minQ, double maxQ, boolean connected,
                                          boolean mainComponent, ValidationConfig config, Writer writer); boolean checkGenerators(String id, double p, double q, double v, double targetP, double targetQ, double targetV,
                                          boolean voltageRegulatorOn, double minP, double maxP, double minQ, double maxQ, boolean connected,
                                          boolean mainComponent, ValidationConfig config, ValidationWriter generatorsWriter, BalanceTypeGuesser guesser); static final GeneratorsValidation INSTANCE; }