Exemplo n.º 1
0
        public void Clone_State_ReturnsAnotherInstance()
        {
            var a = new PositioningAdjustmentAction
            {
                PositionChanges = new[]
                {
                    new GlyphPositionChange {
                        AdvanceX = 1, AdvanceY = 2, OffsetX = 3, OffsetY = 4
                    },
                    new GlyphPositionChange {
                        AdvanceX = 2, AdvanceY = 3, OffsetX = 4, OffsetY = 5
                    }
                }
            };

            var b = a.Clone();

            Assert.AreNotSame(a, b);
        }
Exemplo n.º 2
0
        public void Clone_State_ReturnsClone()
        {
            var a = new PositioningAdjustmentAction
            {
                PositionChanges = new[]
                {
                    new GlyphPositionChange {
                        AdvanceX = 1, AdvanceY = 2, OffsetX = 3, OffsetY = 4
                    },
                    new GlyphPositionChange {
                        AdvanceX = 2, AdvanceY = 3, OffsetX = 4, OffsetY = 5
                    }
                }
            };

            var b = a.Clone();

            var comparer = new TransitionActionEqualityComparer();

            Assert.IsTrue(comparer.Equals(a, b));
        }