Exemple #1
0
        public void GetRemainingLeaves(int month)
        {
            FluentAssertionsEmployee employee =
                new FluentAssertionsEmployee("", DateTime.Now);

            employee.GetRemainingLeaves(month).Should()
            .Be((12 - month) * 2);
        }
Exemple #2
0
        public void NotBeViolated()
        {
            FluentAssertionsEmployee employee =
                _fixture.Employee;

            Action act = () => employee.GetShot();

            act.Should().Throw <EmployeeRightsViolationException>()
            .WithMessage("Employees may not be shot");
        }
Exemple #3
0
        public void SetEmployeeNames(string name, DateTime dob)
        {
            FluentAssertionsEmployee employee =
                new FluentAssertionsEmployee(name, dob);

            employee.Name.Should()
            .Be(name, because: "That's what my parents named me!");
            employee.DateOfBirth.Should()
            .Be(dob, because: "believe it or not, I am very very old!");
        }
Exemple #4
0
        public void SetEmployeeName()
        {
            FluentAssertionsEmployee employee =
                _fixture.Employee;

            employee.Name.Should()
            .Be("Upendra", because: "That's what my parents named me!");
            employee.DateOfBirth.Should()
            .Be(new DateTime(1913, 3, 23), because: "believe it or not, I am very very old!");
        }
Exemple #5
0
 public FluentAssertionsEmployeeFixture()
 {
     Employee = new FluentAssertionsEmployee("Upendra", new DateTime(1913, 3, 23));
 }