Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/RingtoetsMapDataFeaturesFactoryTest.cs =================================================================== diff -u -ra43e923ba7f90d57988aaeecf132d25fe3db0c23 -r0d6ba13ff44f0e1c5c62fdfd16e97c0851f2e44d --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/RingtoetsMapDataFeaturesFactoryTest.cs (.../RingtoetsMapDataFeaturesFactoryTest.cs) (revision a43e923ba7f90d57988aaeecf132d25fe3db0c23) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/RingtoetsMapDataFeaturesFactoryTest.cs (.../RingtoetsMapDataFeaturesFactoryTest.cs) (revision 0d6ba13ff44f0e1c5c62fdfd16e97c0851f2e44d) @@ -777,19 +777,32 @@ } [Test] - public void CreateSinglePointMapFeature_CreatesaSinglePointMapFeature() + public void CreateSinglePointMapFeature_PointNull_ThrowArgumentNullException() { + // Call + TestDelegate test = () => RingtoetsMapDataFeaturesFactory.CreateSinglePointMapFeature(null); + + // Assert + var exception = Assert.Throws(test); + Assert.AreEqual("point", exception.ParamName); + } + + [Test] + public void CreateSinglePointMapFeature_WithPoint_CreatesASinglePointMapFeature() + { // Setup var point = new Point2D(0, 0); // Call var pointMapFeature = RingtoetsMapDataFeaturesFactory.CreateSinglePointMapFeature(point); // Assert - Assert.AreEqual(1, pointMapFeature.MapGeometries.Count()); - MapGeometry mapGeometry = pointMapFeature.MapGeometries.First(); - Assert.AreEqual(1, mapGeometry.PointCollections.Count()); - Assert.AreSame(point, mapGeometry.PointCollections.First().First()); + MapGeometry[] mapGeometries = pointMapFeature.MapGeometries.ToArray(); + Assert.AreEqual(1, mapGeometries.Length); + MapGeometry mapGeometry = mapGeometries.First(); + IEnumerable[] geometryPointCollections = mapGeometry.PointCollections.ToArray(); + Assert.AreEqual(1, geometryPointCollections.Length); + Assert.AreSame(point, geometryPointCollections.First().First()); } private static void AssertEqualFeatureCollections(Point2D[] points, MapFeature[] features)