public void ShouldCalculateRateAt8DollarsPerHour_GivenTimeIsAfterBedtimeAndBeforeMidnight()
        {
            var configuration = new ConfigurationBuilder()
                                .AddInMemoryCollection(new Dictionary <string, string>
            {
                { "BedtimeHour", "18" }
            }).Build();
            var sut     = new BabySitterController(configuration);
            var request = new CalculatePayRequest
            {
                StartTime = new DateTime(2020, 01, 01, 19, 00, 00),
                EndTime   = new DateTime(2020, 01, 01, 20, 00, 00)
            };

            var response = (OkObjectResult)sut.CalculatePay(request);

            response.StatusCode.Should().Be(200);
            response.Value.Should().Be("$8.00");
        }
        public void ShouldCalculatePayForAllRates()
        {
            var configuration = new ConfigurationBuilder()
                                .AddInMemoryCollection(new Dictionary <string, string>
            {
                { "BedtimeHour", "20" }
            }).Build();
            var sut     = new BabySitterController(configuration);
            var request = new CalculatePayRequest
            {
                StartTime = new DateTime(2020, 01, 01, 17, 00, 00),
                EndTime   = new DateTime(2020, 01, 02, 04, 00, 00)
            };

            var response = (OkObjectResult)sut.CalculatePay(request);

            response.StatusCode.Should().Be(200);
            response.Value.Should().Be("$132.00");
        }