Пример #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldStartWithNoVote()
        public virtual void ShouldStartWithNoVote()
        {
            // given
            VoteState voteState = new VoteState();

            // then
            assertNull(voteState.VotedFor());
        }
Пример #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldStoreVote()
        public virtual void ShouldStoreVote()
        {
            // given
            VoteState voteState = new VoteState();
            MemberId  member    = new MemberId(System.Guid.randomUUID());

            // when
            voteState.Update(member, 0);

            // then
            assertEquals(member, voteState.VotedFor());
        }
Пример #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldClearVote()
        public virtual void ShouldClearVote()
        {
            // given
            VoteState voteState = new VoteState();
            MemberId  member    = new MemberId(System.Guid.randomUUID());

            voteState.Update(member, 0);

            // when
            voteState.Update(null, 1);

            // then
            assertNull(voteState.VotedFor());
        }