public void Create_TextMessage()
        {
            // Arrange
            var weatherData = WeatherDataBuilder.Randomized()
                              .WithWarmWeather()
                              .WithSunnyWeather()
                              .Build();

            // Act
            var recommendation = recommendationFactory.Create(weatherData);

            // Assert
            Assert.Equal(OutreachType.TextMessage, recommendation.RecommendedOutreachCode);
        }
Exemplo n.º 2
0
        public void RecommendationOutreachType_displays_string(OutreachType type, string expectedValue)
        {
            // Arrange
            var startTime        = DateTime.UtcNow;
            var endTime          = startTime.AddHours(3);
            var weatherDataValue = WeatherDataBuilder.Randomized().Build();

            // Act
            var recommendationValue = new RecommendationValue(startTime,
                                                              endTime,
                                                              type,
                                                              weatherDataValue);

            // Assert
            Assert.Equal(expectedValue, recommendationValue.RecommendedOutreachType);
        }
Exemplo n.º 3
0
        private OutreachRecommendationsBuilder()
        {
            var start = DateTime.UtcNow;
            var end   = start.AddHours(3);

            // TODO - Use actual random values
            outreachRecommendation = new OutreachRecommendation(
                "54022",
                "River Falls",
                new List <RecommendationValue>
            {
                new RecommendationValue(
                    start,
                    end,
                    OutreachType.Email,
                    WeatherDataBuilder.Randomized().Build())
            }
                );
        }
Exemplo n.º 4
0
        public void Ctor_Argument_Map()
        {
            // Arrange
            var startTime        = DateTime.UtcNow;
            var endTime          = startTime.AddHours(3);
            var outreachType     = OutreachType.Email;
            var weatherDataValue = WeatherDataBuilder.Randomized().Build();

            // Act
            var recommendationValue = new RecommendationValue(startTime,
                                                              endTime,
                                                              outreachType,
                                                              weatherDataValue);

            // Assert
            Assert.Equal(startTime, recommendationValue.StartTime);
            Assert.Equal(endTime, recommendationValue.EndTime);
            Assert.Equal(outreachType, recommendationValue.RecommendedOutreachCode);
            Assert.Equal(weatherDataValue, recommendationValue.Weather);
        }