Beispiel #1
0
        public void EmptyBallotsTest()
        {
            var a = new StvBallot();

            Assert.IsNotNull(a.OrderedCandidatesIds);
            Assert.IsTrue(a.HasSame(null));
            Assert.IsTrue(a.HasSame(new int[0]));
        }
Beispiel #2
0
        public void CompareTest()
        {
            var a = new StvBallot(new[] { 1, 2 });

            Assert.IsFalse(a.HasSame(null));
            Assert.IsFalse(a.HasSame(new int[] { }));
            Assert.IsFalse(a.HasSame(new int[] { 1 }));
            Assert.IsFalse(a.HasSame(new int[] { 1, 2, 3 }));
            Assert.IsFalse(a.HasSame(new int[] { 1, 3 }));
            Assert.IsTrue(a.HasSame(new int[] { 1, 2 }));
        }