Exemplo n.º 1
0
//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);
            }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldAllowSkipAfterSkip()
        internal virtual void ShouldAllowSkipAfterSkip()
        {
            // given
            _referenceCheck.skip();
            // when
            _referenceCheck.skip();
        }