/* Consistency check */ //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void mustCheckConsistencyOnAllAliveAccessors() public virtual void MustCheckConsistencyOnAllAliveAccessors() { foreach (IndexAccessor accessor in _aliveAccessors) { when(accessor.ConsistencyCheck(any(typeof(ReporterFactory)))).thenReturn(true); } assertTrue(_fusionIndexAccessor.consistencyCheck(ReporterFactories.noopReporterFactory())); foreach (IndexAccessor accessor in _aliveAccessors) { verify(accessor, times(1)).consistencyCheck(any(typeof(ReporterFactory))); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @After public void after() public virtual void After() { try { Accessor.consistencyCheck(ReporterFactories.throwingReporterFactory()); } finally { Accessor.drop(); Accessor.Dispose(); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void mustFailConsistencyCheckIfOneAliveAccessorFails() public virtual void MustFailConsistencyCheckIfOneAliveAccessorFails() { foreach (IndexAccessor failingAccessor in _aliveAccessors) { foreach (IndexAccessor accessor in _aliveAccessors) { if (accessor == failingAccessor) { when(failingAccessor.ConsistencyCheck(any(typeof(ReporterFactory)))).thenReturn(false); } else { when(failingAccessor.ConsistencyCheck(any(typeof(ReporterFactory)))).thenReturn(true); } } assertFalse(_fusionIndexAccessor.consistencyCheck(ReporterFactories.noopReporterFactory())); ResetMocks(); } }