public void UnitOfWork_WithFake_PromoteAllClasses_IncrementsYears() { var student = new Student { YearsCompleted = 2, IsGraduated = false }; fakeBackingCollection.Add(student); serviceWithFake.PromoteAllClasses(); Assert.AreEqual(3, student.YearsCompleted); }
public void UnitOfWork_WithFake_PromoteAllClasses_GraduatesStudents() { var eligibleStudent = new Student { YearsCompleted = 3, IsGraduated = false }; var ineligibleStudent = new Student { YearsCompleted = 2, IsGraduated = false }; fakeBackingCollection.Add(eligibleStudent); fakeBackingCollection.Add(ineligibleStudent); serviceWithFake.PromoteAllClasses(); Assert.True(eligibleStudent.IsGraduated); Assert.False(ineligibleStudent.IsGraduated); }