예제 #1
0
        public void Changing_AffectsGeometry_Property_Causes_PlatformImpl_To_Be_Updated()
        {
            var target       = new TestGeometry();
            var platformImpl = target.PlatformImpl;

            target.Foo = true;

            Assert.NotSame(platformImpl, target.PlatformImpl);
        }
예제 #2
0
        public void Setting_Transform_Causes_Changed_To_Be_Raised()
        {
            var target = new TestGeometry();
            var raised = false;

            target.Changed  += (s, e) => raised = true;
            target.Transform = new RotateTransform(45);

            Assert.True(raised);
        }
예제 #3
0
        public void Changing_AffectsGeometry_Property_Causes_Changed_To_Be_Raised()
        {
            var target = new TestGeometry();
            var raised = false;

            target.Changed += (s, e) => raised = true;
            target.Foo      = true;

            Assert.True(raised);
        }
예제 #4
0
        public void Transform_Produces_Transformed_PlatformImpl()
        {
            var target = new TestGeometry();
            var rotate = new RotateTransform(45);

            Assert.False(target.PlatformImpl is ITransformedGeometryImpl);
            target.Transform = rotate;
            Assert.True(target.PlatformImpl is ITransformedGeometryImpl);
            rotate.Angle = 0;
            Assert.False(target.PlatformImpl is ITransformedGeometryImpl);
        }
예제 #5
0
        public void Changing_Transform_Causes_Changed_To_Be_Raised()
        {
            var transform = new RotateTransform(45);
            var target = new TestGeometry { Transform = transform };
            var raised = false;

            target.Changed += (s, e) => raised = true;
            transform.Angle = 90;

            Assert.True(raised);
        }