Beispiel #1
0
        public void StaffRegistration_AddATeacher_ShouldReturnTrue()
        {
            //Arrange
            Teacher teacher = new Teacher
            {
                AcceptsEmails        = true,
                FirstName            = "Ashley",
                FormalName           = "Mrs. Williams",
                GovernmentEmployeeId = "123456",
                Id        = Guid.NewGuid(),
                LastName  = "Williams",
                TeachesIn = new Classroom {
                    Grade = 1, Name = "Class A", RoomNumber = 102
                }
            };

            mock.Setup(repo => repo.Register(teacher)).Returns(true);
            registration = new BusinessConcrete.Registration(mock.Object);


            //Act
            var res = registration.RegisterTeacher(teacher);

            //Assert
            Assert.IsTrue(res);
        }
Beispiel #2
0
 public RegistrationTest()
 {
     repo         = new RegistrationRepository <Staff>();
     registration = new BusinessConcrete.Registration(repo);
 }