public void ProgressJob_ShouldAdvance(int startdate, int duration, int CurrentDay, int progress, int dayssincecreation, int daysToAdvance) { //arrange Job J_Test = new Job(CurrentDay) { StartDate = startdate, Duration = duration, Progress = progress, IsCurrentlyProgressing = true, Days_Since_Creation = dayssincecreation, Complete = false }; Mock <IEventAggregator> EAM = new Mock <IEventAggregator>(); Mock <RequestJobEventEvent> RJEM = new Mock <RequestJobEventEvent>(); EAM.Setup(x => x.GetEvent <RequestJobEventEvent>()).Returns(RJEM.Object); JobLogic JL_Test = new JobLogic(new RandomProvider(), EAM.Object); //act JL_Test.ProgressJob(J_Test, daysToAdvance); //assert Assert.AreEqual(J_Test.Complete, false, "Complete not false"); Assert.AreEqual(J_Test.StartDate, startdate, "StartDate improperly changed"); Assert.AreEqual(J_Test.Duration, duration, "Duration improperly changed"); Assert.AreEqual(J_Test.Progress, progress + daysToAdvance, "Progress improperly advanced"); Assert.AreEqual(J_Test.IsCurrentlyProgressing, true, "IsCurrentlyProgressing not true"); Assert.AreEqual(J_Test.Days_Since_Creation, dayssincecreation, "Days_Since_Creation improperly advanced"); EAM.VerifyNoOtherCalls(); }