Пример #1
0
        public void CountCorrectlyWhenAllAdded()
        {
            var candidates = new Candidates(9);

            candidates.AddAll();
            candidates.Count.Should().Be(9);
        }
Пример #2
0
        public void RemoveCandidateShouldWork()
        {
            var candidates = new Candidates(9);

            candidates.AddAll();
            candidates.Has(5).Should().BeTrue();
            candidates.Remove(5).Should().BeTrue();
            candidates.Has(5).Should().BeFalse();
        }
Пример #3
0
        public void AddAllShouldAddAll()
        {
            var candidates = new Candidates(9);

            candidates.AddAll();
            for (byte i = 1; i <= 9; i++)
            {
                candidates.Has(i).Should().BeTrue();
            }
        }
Пример #4
0
        public void ClearShouldClear()
        {
            var candidates = new Candidates(9);

            candidates.AddAll();
            candidates.Clear();
            for (byte i = 1; i <= 9; i++)
            {
                candidates.Has(i).Should().BeFalse();
            }
        }