public void Minutes_When_Minutes_LessThan1_Returned_SlidingExpiration_Of_1() { // Arrange var minutes = Random.Int(max: 0); // Act var result = CacheOptions.Minutes(minutes); // Assert result.SlidingExpiration.Value.Minutes.ShouldBe(1); }
public void Minutes_When_Minutes_Set_Returns_Configured_Options() { // Arrange var minutes = Random.Int(min: 1); var expected = TimeSpan.FromMinutes(minutes); // Act var result = CacheOptions.Minutes(minutes); // Assert result.SlidingExpiration.Value.Minutes.ShouldBe(expected.Minutes); }