コード例 #1
0
        public void TestConstructor()
        {
            YellowBlock yellow = new YellowBlock(0, 20);

            Assert.AreEqual(Color.Yellow, yellow.Color);
            Assert.AreEqual(0, yellow.X);
            Assert.AreEqual(20, yellow.Y);
            Assert.AreEqual(50, yellow.Width);
            Assert.AreEqual(60, yellow.Height);
        }
コード例 #2
0
        public void TestBlockColor()
        {
            RedBlock    red    = new RedBlock(0, 0);
            GreenBlock  green  = new GreenBlock(0, 0);
            BlueBlock   blue   = new BlueBlock(0, 0);
            YellowBlock yellow = new YellowBlock(0, 20);

            Assert.AreEqual(Color.Yellow, yellow.Color);
            Assert.AreEqual(Color.Red, red.Color);
            Assert.AreEqual(Color.Blue, blue.Color);
            Assert.AreEqual(Color.Green, green.Color);
        }