コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldDropMessagesIfHasNotBeenStarted()
        public virtual void ShouldDropMessagesIfHasNotBeenStarted()
        {
            // when
            _handler.handle(_heartbeat);

            // then
            verify(@delegate, Mockito.never()).handle(_heartbeat);
        }
コード例 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldDropMessagesIfHasBeenStopped() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldDropMessagesIfHasBeenStopped()
        {
            // given
            _handler.start(_clusterId);
            _handler.stop();

            // when
            _handler.handle(_heartbeat);

            // then
            verify(@delegate, Mockito.never()).handle(_heartbeat);
        }
コード例 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldDropMessagesIfForDifferentClusterId() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldDropMessagesIfForDifferentClusterId()
        {
            // given
            _handler.start(_clusterId);

            // when
            _handler.handle(Org.Neo4j.causalclustering.core.consensus.RaftMessages_ReceivedInstantClusterIdAwareMessage.of(Instant.now(), new ClusterId(System.Guid.randomUUID()), new Org.Neo4j.causalclustering.core.consensus.RaftMessages_Heartbeat(new MemberId(System.Guid.randomUUID()), 0L, 0, 0)
                                                                                                                           ));

            // then
            verify(@delegate, Mockito.never()).handle(ArgumentMatchers.any(typeof(Org.Neo4j.causalclustering.core.consensus.RaftMessages_ReceivedInstantClusterIdAwareMessage)));
        }