示例#1
0
        public void Sample()
        {
            var person = new Person {BirthDate = DateTime.Today.AddYears(-30)};
            var fossil = new Fossil {AmountOfCarbon = 50};
            var tree = new Tree {Rings = 20};

            Expect(Age(person), Is.EqualTo(30));
            Expect(Age(fossil), Is.EqualTo(10));
            Expect(Age(tree), Is.EqualTo(20));
        }
示例#2
0
        public void Sample()
        {
            var person = new Person {
                BirthDate = DateTime.Today.AddYears(-30)
            };
            var fossil = new Fossil {
                AmountOfCarbon = 50
            };
            var tree = new Tree {
                Rings = 20
            };

            Expect(Age(person), Is.EqualTo(30));
            Expect(Age(fossil), Is.EqualTo(10));
            Expect(Age(tree), Is.EqualTo(20));
        }