Transformers3WValidation extends AbstractTransformersValidation { public boolean checkTransformer(ThreeWindingsTransformer twt, ValidationConfig config, Writer writer) { Objects.requireNonNull(twt); Objects.requireNonNull(config); Objects.requireNonNull(writer); try (ValidationWriter twtsWriter = ValidationUtils.createValidationWriter(twt.getId(), config, writer, ValidationType.TWTS3W)) { return checkTransformer(twt, config, twtsWriter); } catch (IOException e) { throw new UncheckedIOException(e); } } private  Transformers3WValidation(); @Override boolean checkTransformers(Network network, ValidationConfig config, ValidationWriter twtsWriter); boolean checkTransformer(ThreeWindingsTransformer twt, ValidationConfig config, Writer writer); boolean checkTransformer(ThreeWindingsTransformer twt, ValidationConfig config, ValidationWriter twtsWriter); static final Transformers3WValidation INSTANCE; }
@Test public void checkTwts() { assertFalse(Transformers3WValidation.INSTANCE.checkTransformer(twtValidationData.get3WTransformer(), strictConfig, NullWriter.NULL_WRITER)); strictConfig.setThreshold(.3); assertTrue(Transformers3WValidation.INSTANCE.checkTransformer(twtValidationData.get3WTransformer(), strictConfig, NullWriter.NULL_WRITER)); twtValidationData.setNanLeg1P(); assertFalse(Transformers3WValidation.INSTANCE.checkTransformer(twtValidationData.get3WTransformer(), strictConfig, NullWriter.NULL_WRITER)); strictConfig.setOkMissingValues(true); assertTrue(Transformers3WValidation.INSTANCE.checkTransformer(twtValidationData.get3WTransformer(), strictConfig, NullWriter.NULL_WRITER)); }