コード例 #1
0
ファイル: UnitTest1.cs プロジェクト: sgodee2/Mastermind
        public void TestCheckMatchNone()
        {
            var FourDigits = new List <Digit>
            {
                new Digit {
                    DigitValue = "4"
                },
                new Digit {
                    DigitValue = "3"
                },
                new Digit {
                    DigitValue = "2"
                },
                new Digit {
                    DigitValue = "1"
                },
            };

            Assert.AreEqual("", CheckDigits.Check("5656", FourDigits));
        }
コード例 #2
0
ファイル: UnitTest1.cs プロジェクト: sgodee2/Mastermind
        public void TestCheckMatch1()
        {
            var FourDigits = new List <Digit>
            {
                new Digit {
                    DigitValue = "4"
                },
                new Digit {
                    DigitValue = "3"
                },
                new Digit {
                    DigitValue = "2"
                },
                new Digit {
                    DigitValue = "1"
                },
            };

            Assert.AreEqual("+---", CheckDigits.Check("4213", FourDigits));
        }