예제 #1
0
        public void Defaults_BackingFields()
        {
            if (PolygonViewPoker.NewRefcountEnabled())
            {
                Assert.Inconclusive("backing fields are removed when newrefcount is enabled");
            }

            using (var pv = new PolygonViewPoker()) {
                Assert.Null(pv.PolygonBackingField, "1a");
                Assert.Null(pv.Polygon, "2a");
            }
        }
예제 #2
0
        public void Polygon_BackingFields()
        {
            if (PolygonViewPoker.NewRefcountEnabled())
            {
                Assert.Inconclusive("backing fields are removed when newrefcount is enabled");
            }

            using (var p = new MKPolygon())
                using (var pv = new PolygonViewPoker(p)) {
                    Assert.AreSame(p, pv.PolygonBackingField, "1a");
                    Assert.AreSame(p, pv.Polygon, "2a");
                }
        }