コード例 #1
0
        /* Test #5: throw exception if wrong number for service for deceased person */

        public void ServiceWrong()
        {
            Assert.Catch(() =>
            {
                var e = new Deceased("Tisch", "Elise", "30/05/1980", "29/05/2010", 7, 'w');
            });
        }
コード例 #2
0
        /* Test #7: analog test 6, for Deceased*/

        public void CorrectService2()
        {
            var g = new Deceased("Raab", "Helena", "06/06/1950", "07/07/1999", 4, 'w');

            Assert.IsTrue(g.ServiceAbo == "Gold Package: will, burial, administrative procedure incl obituary, grave fence");
        }
コード例 #3
0
        /* Test #4 if the age is correctly counted*/

        public void AgeCounting()
        {
            var d = new Deceased("Tisch", "Elise", "30/05/1980", "29/05/2010", 2, 'w');

            Assert.IsTrue(d.Age == 29);
        }