public async Task indicates_whether_activator_is_not_active() { var activator = new FromToActivatorBuilder() .WithReleaseDates(DateTime.UtcNow.AddDays(-2), DateTime.UtcNow.AddDays(-1), format: "yyyy/MM/dd") .Build(); (await activator.IsActiveAsync("some_feature")).Should().Be(false); }
public async Task use_dates_with_different_formats() { var activator = new FromToActivatorBuilder() .WithReleaseDates(DateTime.UtcNow.AddDays(-1), DateTime.UtcNow.AddDays(1), format: "yyyy/MM/dd") .Build(); (await activator.IsActiveAsync("some_feature")).Should().Be(true); activator = new FromToActivatorBuilder() .WithReleaseDates(DateTime.UtcNow.AddDays(-2), DateTime.UtcNow.AddDays(-1), format: "yyyy/MM/dd") .Build(); (await activator.IsActiveAsync("some_feature")).Should().Be(false); }