Example #1
0
        public void TestAdultEductionPupilsToString_ShouldContainJob()
        {
            AdultEductionPupil p = new AdultEductionPupil("Clark", "Kent", 2015, 2, "Superman");

            Assert.IsTrue(
                p.ToString().Contains("Currently working as 'Superman'"),
                @"The ToString() method should return a string containing the job following the format ""Currently working as '<Job>'""!");
        }
Example #2
0
        public void TestAdultEductionPupilsToString_ShouldContainRegistrationNumber()
        {
            AdultEductionPupil p = new AdultEductionPupil("Paul", "Landner", 2017, 13, "Carpenter");

            Assert.IsTrue(
                p.ToString().Contains("RegistrationNr: AB170013"),
                @"The ToString() method should return a string containing the registration number which follows the format 'RegistrationNr: AB<inscription year><inscription number>!'"
                );
        }