public async Task GivenMaxAgeInSeconds_WhenInfinite_ThenExpectHasExpiredFalse() { //act var uowStatusService = new UOWStatusService(null, null); var hasExpiredResult = await uowStatusService.HasExpiredAge("testUowId", creationEPOCH : 1, maxAgeInSeconds : -1); //assert Assert.False(hasExpiredResult); }
public async Task GivenStatusInKV_AndInfiniteRetries_ThenExpectHasExpiredRetriesFalse() { //act var uowStatusService = new UOWStatusService(null, null); var hasExpiredResult = await uowStatusService.HasExpiredAge("testId", creationEPOCH : 1, maxAgeInSeconds : -1); //assert Assert.True(hasExpiredResult == false); }
public async Task GivenMaxAgeInSeconds_WhenNotExpired_ThenExpectHasExpiredFalse() { //act var uowStatusService = new UOWStatusService(null, _logService); DateTimeOffset creationDateTimeOffset = DateTime.UtcNow.AddDays(-1); var creationEpoch = creationDateTimeOffset.ToUnixTimeSeconds(); var hasExpiredResult = await uowStatusService.HasExpiredAge("testUowId", creationEPOCH : creationEpoch, maxAgeInSeconds : 864000); //assert Assert.False(hasExpiredResult); }