public async Task HandlingPreserveCommand_ShouldPreserveSupplierRequirement_WhenTagIsInSupplierStep() { await _dut.Handle(_commandForSupplierRequirement, default); var expectedNextDueTimeUtc = _utcNow.AddWeeks(Interval); Assert.AreEqual(expectedNextDueTimeUtc, _requirementForSupplier.NextDueTimeUtc); Assert.AreEqual(expectedNextDueTimeUtc, _tagInSupplierStep.NextDueTimeUtc); Assert.IsNotNull(_initialPreservationPeriodForSupplierRequirement.PreservationRecord); }
public async Task HandlingPreserveCommand_ShouldPreserveRequirementsOnTag_IsDue() { var req1WithTwoWeekIntervalInitialPeriod = _req1ForAllWithTwoWeekInterval.ActivePeriod; var req2WithTwoWeekIntervalInitialPeriod = _req2ForAllWithTwoWeekInterval.ActivePeriod; var req3WithFourWeekIntervalInitialPeriod = _req3ForAllWithFourWeekInterval.ActivePeriod; _timeProvider.ElapseWeeks(TwoWeeksInterval); await _dut.Handle(_commandForTagWithForAllRequirements, default); var expectedNextDueTimeUtc = _timeProvider.UtcNow.AddWeeks(TwoWeeksInterval); Assert.AreEqual(expectedNextDueTimeUtc, _req1ForAllWithTwoWeekInterval.NextDueTimeUtc); Assert.AreEqual(expectedNextDueTimeUtc, _tagWithForAllRequirements.NextDueTimeUtc); Assert.IsNotNull(req1WithTwoWeekIntervalInitialPeriod.PreservationRecord); Assert.AreEqual(expectedNextDueTimeUtc, _req2ForAllWithTwoWeekInterval.NextDueTimeUtc); Assert.IsNotNull(req2WithTwoWeekIntervalInitialPeriod.PreservationRecord); Assert.IsNull(req3WithFourWeekIntervalInitialPeriod.PreservationRecord); }