/** * Inspects the target exporter's output using specified expected data and rule. * @param modelClass class of data model * @param description target exporter * @param verifyContext current verification context * @param verifier verifier factory * @return detected invalid differences * @throws IOException if failed to inspect the result * @throws IllegalArgumentException if some parameters were {@code null} */ public List<Difference> inspect( Class<?> modelClass, ExporterDescription description, VerifyContext verifyContext, VerifierFactory verifier) throws IOException { if (modelClass == null) { throw new IllegalArgumentException("modelClass must not be null"); //$NON-NLS-1$ } if (description == null) { throw new IllegalArgumentException("description must not be null"); //$NON-NLS-1$ } if (verifyContext == null) { throw new IllegalArgumentException("verifyContext must not be null"); //$NON-NLS-1$ } if (verifier == null) { throw new IllegalArgumentException("verifier must not be null"); //$NON-NLS-1$ } DataModelDefinition<?> definition = repository.toDataModelDefinition(modelClass); return inspect(definition, description, verifyContext, verifier); }
/** * Verifies jobflow output. * @param description the exporter description * @param verifier the verifier * @return verify differences * @throws IOException if failed to verify the output */ public List<Difference> verify(ExporterDescription description, VerifierFactory verifier) throws IOException { TestModerator moderator = new TestModerator(getTestTools(), this); return moderator.inspect( description.getModelType(), description, new VerifyContext(this), verifier); }
List<Difference> diffList = moderator.inspect( port.getDataType(), port.getDescription(),