예제 #1
0
        public void CreateBackgroundLayerStatus_MapDataNull_ThrowsArgumentNullException()
        {
            // Call
            TestDelegate test = () => BackgroundLayerStatusFactory.CreateBackgroundLayerStatus(null);

            // Assert
            string paramName = Assert.Throws <ArgumentNullException>(test).ParamName;

            Assert.AreEqual("mapData", paramName);
        }
예제 #2
0
        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);
        }
예제 #3
0
        public void CreateBackgroundLayerStatus_WmtsMapData_ReturnsWmtsBackgroundLayerStatus()
        {
            // Setup
            WmtsMapData mapData = WmtsMapDataTestHelper.CreateAlternativePdokMapData();

            // Call
            BackgroundLayerStatus backgroundLayerStatus = BackgroundLayerStatusFactory.CreateBackgroundLayerStatus(mapData);

            // Assert
            Assert.IsInstanceOf <WmtsBackgroundLayerStatus>(backgroundLayerStatus);
        }
예제 #4
0
        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);
        }