Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldAcceptRequestIfLogEndsAtHigherTermAndCandidateLogIsSameLength()
        public virtual void ShouldAcceptRequestIfLogEndsAtHigherTermAndCandidateLogIsSameLength()
        {
            assertTrue(Voting.shouldVoteFor(Candidate, CurrentTerm, CurrentTerm, LogTerm, LogTerm + 1, AppendIndex, AppendIndex, false, Log));
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldAcceptRequestIfLogsEndInSameTermAndCandidateLogIsLonger()
        public virtual void ShouldAcceptRequestIfLogsEndInSameTermAndCandidateLogIsLonger()
        {
            assertTrue(Voting.shouldVoteFor(Candidate, CurrentTerm, CurrentTerm, LogTerm, LogTerm, AppendIndex, AppendIndex + 1, false, Log));
        }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldAcceptRequestIfLogsEndInHigherTermAndCandidateLogIsShorter()
        public virtual void ShouldAcceptRequestIfLogsEndInHigherTermAndCandidateLogIsShorter()
        {
            assertTrue(Voting.shouldVoteFor(Candidate, CurrentTerm, CurrentTerm, LogTerm, LogTerm + 1, AppendIndex, AppendIndex - 1, false, Log));
        }
Exemplo n.º 4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldRejectRequestIfLogsEndInSameTermButCandidateLogIsShorter()
        public virtual void ShouldRejectRequestIfLogsEndInSameTermButCandidateLogIsShorter()
        {
            assertFalse(Voting.shouldVoteFor(Candidate, CurrentTerm, CurrentTerm, LogTerm, LogTerm, AppendIndex, AppendIndex - 1, false, Log));
        }
Exemplo n.º 5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldRejectRequestIfCandidateLogEndsAtLowerTerm()
        public virtual void ShouldRejectRequestIfCandidateLogEndsAtLowerTerm()
        {
            assertFalse(Voting.shouldVoteFor(Candidate, CurrentTerm, CurrentTerm, LogTerm, LogTerm - 1, AppendIndex, AppendIndex, false, Log));
        }
Exemplo n.º 6
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldRejectRequestFromOldTerm()
        public virtual void ShouldRejectRequestFromOldTerm()
        {
            assertFalse(Voting.shouldVoteFor(Candidate, CurrentTerm, CurrentTerm - 1, LogTerm, LogTerm, AppendIndex, AppendIndex, false, Log));
        }
Exemplo n.º 7
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldAcceptRequestWithIdenticalLog()
        public virtual void ShouldAcceptRequestWithIdenticalLog()
        {
            assertTrue(Voting.shouldVoteFor(Candidate, CurrentTerm, CurrentTerm, LogTerm, LogTerm, AppendIndex, AppendIndex, false, Log));
        }
Exemplo n.º 8
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldRejectRequestIfAlreadyVotedForOtherCandidate()
        public virtual void ShouldRejectRequestIfAlreadyVotedForOtherCandidate()
        {
            assertFalse(Voting.shouldVoteFor(Candidate, CurrentTerm, CurrentTerm, LogTerm, LogTerm, AppendIndex, AppendIndex, true, Log));
        }