Exemple #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldThrottleLogging()
        public virtual void ShouldThrottleLogging()
        {
            // given
            Log                   log    = mock(typeof(Log));
            FakeClock             clock  = TestClock();
            UnknownAddressMonitor logger = new UnknownAddressMonitor(log, clock, 1000);
            MemberId              to     = member(0);

            // when
            logger.LogAttemptToSendToMemberWithNoKnownAddress(to);
            clock.Forward(1, MILLISECONDS);
            logger.LogAttemptToSendToMemberWithNoKnownAddress(to);

            // then
            verify(log, times(1)).info(format("No address found for %s, probably because the member has been shut " + "down.", to));
        }
Exemple #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldLogFirstFailure()
        public virtual void ShouldLogFirstFailure()
        {
            // given
            Log log = mock(typeof(Log));
            UnknownAddressMonitor logger = new UnknownAddressMonitor(log, TestClock(), 100);

            // when
            MemberId to = member(0);

            logger.LogAttemptToSendToMemberWithNoKnownAddress(to);

            // then
            verify(log).info(format("No address found for %s, probably because the member has been shut down.", to));
        }