コード例 #1
0
        public void TestSnakeParentTrue()
        {
            Rattle_Snake silly   = new Rattle_Snake();
            bool         isFalse = silly.Parent;

            Assert.False(isFalse);
        }
コード例 #2
0
        public void TestSnakeBecameParent()
        {
            Rattle_Snake silly = new Rattle_Snake();

            silly.Parent = true;
            bool isTrue = silly.Parent;

            Assert.True(isTrue);
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: Thood50/Zoo
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Surf_Scoter   msDuck    = new Surf_Scoter();
            Erect_crested dudeErect = new Erect_crested();
            Wolf          wolfie    = new Wolf();
            Jaguar        puss      = new Jaguar();
            Gecko         larry     = new Gecko();
            Rattle_Snake  silly     = new Rattle_Snake();

            Console.WriteLine("Meet Ms Duck");
            Console.WriteLine(msDuck.Noise());
            Console.WriteLine("Meet Dude Erect");
            Console.WriteLine(dudeErect.Noise());
            Console.WriteLine("Meet wolfie");
            Console.WriteLine(wolfie.Noise());
            Console.WriteLine("Meet da puss");
            Console.WriteLine(wolfie.Noise());
            Console.WriteLine("Im larry the lizard");
            Console.WriteLine(larry.Noise());
            Console.WriteLine("Im silly the snake");
            Console.WriteLine(silly.Noise());
            Console.ReadLine();
        }
コード例 #4
0
        public void TestSnakeDietInterface()
        {
            Rattle_Snake silly = new Rattle_Snake();

            Assert.Equal("I eat sssssmall rodentssss and other ssssnakessss", silly.Diet());
        }
コード例 #5
0
        public void TestSnakeNoiseInterface()
        {
            Rattle_Snake silly = new Rattle_Snake();

            Assert.Equal("sssssssssssss, im a sssslippery sssssnake", silly.Noise());
        }