public void CaDetectDistinct() { var involvedRows = new List <InvolvedRow> { new InvolvedRow("Table2", 100), new InvolvedRow("Table1", 1000), new InvolvedRow("Table2", 200) }; var involvedTables = new List <InvolvedTable> { new InvolvedTable("Table2", new RowReference[] { new OIDRowReference(100) }), new InvolvedTable("Table1", new RowReference[] { new OIDRowReference(1000) }) }; ITable tableMock = ExceptionObjectTestUtils.GetMockTable(); ExceptionObject exceptionObject = ExceptionObjectTestUtils.CreateExceptionObject( 1, involvedTables); QaError qaError = ExceptionObjectTestUtils.CreateQaError(tableMock, involvedRows); var predicate = new ExceptionObjectInvolvedRowsPredicate(null); Assert.False(predicate.Matches(exceptionObject, qaError)); }
public QualityConditionExceptions(Guid qualityConditionVersionUuid, [CanBeNull] IBox areaOfInterestBox) { _areaOfInterestBox = areaOfInterestBox; _qualityConditionVersionGuid = qualityConditionVersionUuid; _involvedRowsPredicate = new ExceptionObjectInvolvedRowsPredicate(null); }
public QualityConditionExceptions( [NotNull] QualityCondition qualityCondition, [NotNull] IQualityConditionObjectDatasetResolver datasetResolver, [CanBeNull] InvolvedObjectsMatchCriteria involvedObjectsMatchCriteria, [CanBeNull] IBox areaOfInterestBox) { Assert.ArgumentNotNull(qualityCondition, nameof(qualityCondition)); Assert.ArgumentNotNull(datasetResolver, nameof(datasetResolver)); _areaOfInterestBox = areaOfInterestBox; _qualityConditionVersionGuid = new Guid(qualityCondition.VersionUuid); _ignoredDatasetsPredicate = new InvolvedObjectsIgnoredDatasetPredicate( qualityCondition, datasetResolver, involvedObjectsMatchCriteria); _involvedRowsPredicate = new ExceptionObjectInvolvedRowsPredicate( _ignoredDatasetsPredicate.IgnoreDataset); }