示例#1
0
        public static void Start()
        {
            var gen    = new MagicSquareGenerator();
            var square = gen.Generate(3);

            Console.WriteLine(SquareToString(square));

            var v = new MyVerifier();

            Console.WriteLine(v.Verify(square));
        }
        public void TestSizeThree()
        {
            var gen    = new MagicSquareGenerator();
            var square = gen.Generate(3);

            Console.WriteLine(SquareToString(square));

            var v = new MyVerifier(); // prevents cheating :)

            Assert.IsTrue(v.Verify(square),
                          "Verification failed: this is not a magic square");
        }