示例#1
0
        public void AllRetrospectiveItemBaseObjectsCanBeVotedDown()
        {
            RetrospectiveItemBase sut1 = new Like();
            RetrospectiveItemBase sut2 = new Dislike();
            RetrospectiveItemBase sut3 = new ActionItem();

            sut1.ToggleVote("Some_user");
            sut2.ToggleVote("Some_user");
            sut3.ToggleVote("Some_user");

            Assert.Equal(1, sut1.Votes);
            Assert.Equal(1, sut2.Votes);
            Assert.Equal(1, sut3.Votes);

            sut1.ToggleVote("Some_user");
            sut2.ToggleVote("Some_user");
            sut3.ToggleVote("Some_user");

            Assert.Equal(0, sut1.Votes);
            Assert.Equal(0, sut2.Votes);
            Assert.Equal(0, sut3.Votes);
        }