Example #1
0
        public void Should_return_infinite_if_nothing_configured(string planId)
        {
            var sut = new ConfigAppPlansProvider(Enumerable.Empty <ConfigAppLimitsPlan>());

            var result = sut.GetPlanForApp(CreateApp(planId));

            result.Should().BeEquivalentTo((InfinitePlan, "infinite"));
        }
Example #2
0
        public void Should_return_fitting_app_plan()
        {
            var sut = new ConfigAppPlansProvider(Plans);

            var result = sut.GetPlanForApp(CreateApp("basic"));

            result.Should().BeEquivalentTo((BasicPlan, "basic"));
        }
Example #3
0
        public void Should_smallest_plan_if_none_fits()
        {
            var sut = new ConfigAppPlansProvider(Plans);

            var result = sut.GetPlanForApp(CreateApp("enterprise"));

            result.Should().BeEquivalentTo((FreePlan, "free"));
        }