public void CreateBackgroundLayerStatus_MapDataNull_ThrowsArgumentNullException() { // Call TestDelegate test = () => BackgroundLayerStatusFactory.CreateBackgroundLayerStatus(null); // Assert string paramName = Assert.Throws <ArgumentNullException>(test).ParamName; Assert.AreEqual("mapData", paramName); }
public void CreateBackgroundLayerStatus_WellKnownTileSourceMapData_ReturnsWellKnownBackgroundLayerStatus() { // Setup var mapData = new WellKnownTileSourceMapData(new Random().NextEnum <WellKnownTileSource>()); // Call BackgroundLayerStatus backgroundLayerStatus = BackgroundLayerStatusFactory.CreateBackgroundLayerStatus(mapData); // Assert Assert.IsInstanceOf <WellKnownBackgroundLayerStatus>(backgroundLayerStatus); }
public void CreateBackgroundLayerStatus_WmtsMapData_ReturnsWmtsBackgroundLayerStatus() { // Setup WmtsMapData mapData = WmtsMapDataTestHelper.CreateAlternativePdokMapData(); // Call BackgroundLayerStatus backgroundLayerStatus = BackgroundLayerStatusFactory.CreateBackgroundLayerStatus(mapData); // Assert Assert.IsInstanceOf <WmtsBackgroundLayerStatus>(backgroundLayerStatus); }
public void CreateBackgroundLayerStatus_InvalidImageBasedMapData_ThrowsNotSupportedException() { // Setup var mapData = new SimpleImageBasedMapData(); // Call TestDelegate test = () => BackgroundLayerStatusFactory.CreateBackgroundLayerStatus(mapData); // Assert string message = Assert.Throws <NotSupportedException>(test).Message; Assert.AreEqual("Unsupported type of mapData", message); }