Ejemplo n.º 1
0
        public void VerifyClass()
        {
            School.Professor professor = new School.Professor
            {
                Id   = 6,
                Name = "Will"
            };

            School.ClassRoom classRoom = new School.ClassRoom
            {
                Description     = "Game Developer",
                Id              = 50,
                MinGradeForPass = 8f,
                Name            = "GD5",
                Professor       = professor
            };

            IoC.I4IoC <School.ClassRoom> iClassRoom = classRoom;


            string expected = "50 - GD5 (6 - Will) - Game Developer";
            string returned = iClassRoom.ToString();

            Assert.IsTrue(expected == returned, "Expected: {0} Returned: {1}", expected, returned);
        }
Ejemplo n.º 2
0
        public void VerifyProfessor()
        {
            School.Professor professor = new School.Professor {
                Id   = 10,
                Name = "Rick",
                Age  = 43
            };

            IoC.I4IoC <School.Person> iProfessor = professor;


            string expected = "10 - Rick";
            string returned = iProfessor.ToString();

            Assert.IsTrue(expected == returned, "Expected: {0} Returned: {1}", expected, returned);
        }