示例#1
0
文件: Tests.cs 项目: MissSkuld/oom
        public void CreateFish()
        {
            var name = "Fisch";

            Fish f = new Fish(name);

            Assert.IsTrue(f.Name == name);
            Assert.IsTrue(f.Age == 1);
            Assert.IsTrue(f.Color == "silver");
            Assert.IsTrue(f.IsEnvironmentClean == true);
        }
示例#2
0
文件: Tests.cs 项目: MissSkuld/oom
        public void CreateFishWithEverything()
        {
            var name = "Fisch";
            var color = "orange";
            var age = 5;

            Fish f = new Fish(color, age, name);

            Assert.IsTrue(f.Name == name);
            Assert.IsTrue(f.Age == age);
            Assert.IsTrue(f.Color == color);
            Assert.IsTrue(f.IsEnvironmentClean == true);
        }
示例#3
0
文件: Tests.cs 项目: MissSkuld/oom
        public void FeedFish()
        {
            var name = "Fisch";
            var color = "orange";
            var age = 5;

            Fish f = new Fish(color, age, name);

            f.Feed();

            Assert.IsTrue(f.IsHungry == false);
        }