//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test @SuppressWarnings("unchecked") public void shouldOnlySummarizeStatisticsWhenAllReferencesAreChecked() public virtual void ShouldOnlySummarizeStatisticsWhenAllReferencesAreChecked() { // given ConsistencySummaryStatistics summary = mock(typeof(ConsistencySummaryStatistics)); RecordAccess records = mock(typeof(RecordAccess)); ConsistencyReporter.ReportHandler handler = new ConsistencyReporter.ReportHandler(new InconsistencyReport(mock(typeof(InconsistencyLogger)), summary), mock(typeof(ConsistencyReporter.ProxyFactory)), RecordType.PROPERTY, records, new PropertyRecord(0), NO_MONITOR); RecordReference <PropertyRecord> reference = mock(typeof(RecordReference)); ComparativeRecordChecker <PropertyRecord, PropertyRecord, ConsistencyReport_PropertyConsistencyReport> checker = mock(typeof(ComparativeRecordChecker)); handler.comparativeCheck(reference, checker); ArgumentCaptor <PendingReferenceCheck <PropertyRecord> > captor = ( ArgumentCaptor )ArgumentCaptor.forClass(typeof(PendingReferenceCheck)); verify(reference).dispatch(captor.capture()); PendingReferenceCheck pendingRefCheck = captor.Value; // when handler.updateSummary(); // then verifyZeroInteractions(summary); // when pendingRefCheck.skip(); // then verify(summary).update(RecordType.PROPERTY, 0, 0); verifyNoMoreInteractions(summary); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @SuppressWarnings("unchecked") @BeforeEach void setUp() internal virtual void SetUp() { RecordAccess records = mock(typeof(RecordAccess)); ReportHandler handler = new ReportHandler(mock(typeof(InconsistencyReport)), mock(typeof(ConsistencyReporter.ProxyFactory)), RecordType.PROPERTY, records, new PropertyRecord(0), NO_MONITOR); this._referenceCheck = new PendingReferenceCheck <PropertyRecord>(handler, mock(typeof(ComparativeRecordChecker))); }