Exemplo n.º 1
0
        public async Task indicates_whether_activator_is_not_active()
        {
            var activator = new UTCActivatorBuilder()
                            .WithReleaseDate(DateTime.UtcNow.AddDays(1))
                            .Build();

            (await activator.IsActiveAsync("some_feature")).Should().Be(false);
        }
Exemplo n.º 2
0
        public async Task use_dates_with_different_formats()
        {
            var activator = new UTCActivatorBuilder()
                            .WithReleaseDate(DateTime.UtcNow.AddDays(-1), format: "yyyy/MM/dd")
                            .Build();

            (await activator.IsActiveAsync("some_feature")).Should().Be(true);

            activator = new UTCActivatorBuilder()
                        .WithReleaseDate(DateTime.UtcNow.AddDays(1), format: "yyyy/MM/dd")
                        .Build();

            (await activator.IsActiveAsync("some_feature")).Should().Be(false);
        }