예제 #1
0
        public void CreateDuneLocationFeatures_WithLocations_ReturnsLocationFeaturesCollection(bool withOutput)
        {
            // Setup
            DuneLocation[] duneLocations =
            {
                CreateDuneLocation(1),
                CreateDuneLocation(2)
            };

            var failureMechanism = new DuneErosionFailureMechanism();

            failureMechanism.DuneLocationCalculationsForUserDefinedTargetProbabilities.AddRange(new[]
            {
                new DuneLocationCalculationsForTargetProbability(0.1),
                new DuneLocationCalculationsForTargetProbability(0.001)
            });
            failureMechanism.SetDuneLocations(duneLocations);

            if (withOutput)
            {
                DuneLocationsTestHelper.SetDuneLocationCalculationOutput(failureMechanism);
            }

            IEnumerable <AggregatedDuneLocation> aggregatedLocations = AggregatedDuneLocationFactory.CreateAggregatedDuneLocations(
                failureMechanism.DuneLocations,
                failureMechanism.DuneLocationCalculationsForUserDefinedTargetProbabilities);

            // Call
            IEnumerable <MapFeature> features = DuneErosionMapDataFeaturesFactory.CreateDuneLocationFeatures(aggregatedLocations);

            // Assert
            DuneErosionMapFeaturesTestHelper.AssertDuneLocationFeaturesData(failureMechanism, features);
        }
예제 #2
0
        private static void AssertDuneLocationsMapData(DuneErosionFailureMechanism failureMechanism,
                                                       MapData mapData)
        {
            Assert.IsInstanceOf <MapPointData>(mapData);
            Assert.AreEqual("Hydraulische belastingen", mapData.Name);

            var duneLocationsMapData = (MapPointData)mapData;

            DuneErosionMapFeaturesTestHelper.AssertDuneLocationFeaturesData(failureMechanism, duneLocationsMapData.Features);
        }