private void AddStaffMember(string employeeNumber,
            string firstName, string lastName)
        {
            StaffMember staffMember =
                new StaffMember(employeeNumber)
                {
                    FirstName = firstName,
                    LastName = lastName
                };

            staffMemberRepository.SaveOrUpdate(staffMember);
            FlushSessionAndEvict(staffMember);
        }
예제 #2
0
        public void CanCreateStaffMember()
        {
            string employeeNumber = "ABC123";
            string firstName = "Karel";
            string lastName = "Čapek";
            StaffMember staffMember =
                new StaffMember(employeeNumber)
                {
                    FirstName = firstName,
                    LastName = lastName
                };

            Assert.That(staffMember.EmployeeNumber, Is.EqualTo(employeeNumber));
            Assert.That(staffMember.FirstName, Is.EqualTo(firstName));
            Assert.That(staffMember.LastName, Is.EqualTo(lastName));
        }
예제 #3
0
 public void CanCompareStaffMembers()
 {
     string employeeNumber = "ABC123";
     StaffMember staffMember = new StaffMember(employeeNumber);
     Assert.That(staffMember, Is.EqualTo(new StaffMember(employeeNumber)));
 }