public void CreateInstance_WithValidArguments_NewPropertiesWithMapPolygonDataAsData()
        {
            // Setup
            var mapData = new MapPolygonData("Test");
            var context = new MapPolygonDataContext(mapData, new MapDataCollectionContext(new MapDataCollection("test"), null));

            // Call
            IObjectProperties objectProperties = info.CreateInstance(context);

            // Assert
            Assert.IsInstanceOf <MapPolygonDataProperties>(objectProperties);
            Assert.AreSame(mapData, objectProperties.Data);
        }
Exemplo n.º 2
0
        public void Constructor_ExpectedValues()
        {
            // Setup
            var data   = new MapPolygonData("test");
            var parent = new MapDataCollectionContext(new MapDataCollection("parent"), null);

            // Call
            var context = new MapPolygonDataContext(data, parent);

            // Assert
            Assert.IsInstanceOf <FeatureBasedMapDataContext>(context);
            Assert.AreSame(data, context.WrappedData);
            Assert.AreSame(parent, context.ParentMapData);
        }