コード例 #1
0
ファイル: UnitTest1.cs プロジェクト: trecain/Lab05-OOP
        public void CanCreateDuck()
        {
            Duck donald = new Duck("donald", 2, "quack", 10, true);

            Assert.Equal("donald", donald.Name);
            Assert.Equal(2, donald.Legs);
            Assert.Equal("quack", donald.UserSpeech());
            Assert.True(donald.EatsTrash);
            Assert.Equal(10, donald.RabiesLevel);
            Assert.True(donald.BiteSomeone());
            Assert.True(donald.SunBathes);
            Assert.Equal("Soaking those rays up", donald.Bathes());
        }