public void ShouldReturnNullsAndEmptyListsForUnknownAnswers() { var aggregator = new ParkrunQuestionnaireResponseAggregator(); var message = _fixture.Build <ParkrunQuestionnaireResponsesMessage>() .Create(); var aggregation = aggregator.Aggregate(message); aggregation.Should().BeEquivalentTo(new { WheelchairFriendly = (bool?)null, BuggyFriendly = (bool?)null, VisuallyImpairedFriendly = (bool?)null, Toilets = (bool?)null, DogsAllowed = (bool?)null, Cafe = (bool?)null, PostRunCoffee = (bool?)null, DrinkingFountain = (bool?)null, ChangingRooms = (bool?)null, Lockers = (bool?)null, Showers = (bool?)null, BagDrop = (bool?)null, BabyChangingFacilities = (bool?)null, CarParking = (bool?)null, CycleParking = (bool?)null, CarParkingOptions = new CarParkingOption[0], CycleParkingOptions = new CycleParkingOption[0], RecommendedBuggy = new BuggyType[0], Terrain = new TerrainType[0] }); }
public void ShouldReturnTrueForAggregatedYesNoQuestions() { var response = _fixture.Build <QuestionnaireResponse>() .WithAllYesAnswers() .Create(); var message = _fixture.Build <ParkrunQuestionnaireResponsesMessage>() .With(x => x.Responses, new [] { response }) .Create(); var aggregation = _aggregator.Aggregate(message); aggregation.Should().BeEquivalentTo(new { WheelchairFriendly = true, BuggyFriendly = true, VisuallyImpairedFriendly = true, Toilets = true, DogsAllowed = true, Cafe = true, PostRunCoffee = true, DrinkingFountain = true, ChangingRooms = true, Lockers = true, Showers = true, BagDrop = true, BabyChangingFacilities = true, }); }