Пример #1
0
        public static void Equal(IEnumerable <Point> expected, IEnumerable <Point> actual)
        {
            // Handle when 'expected' is null.
            if (expected == null)
            {
                Assert.Null(actual);
                return;
            }
            Assert.NotNull(actual);

            var expectedCollection = expected.SafeToList();
            var actualCollection   = actual.SafeToList();

            Assert.Equal(expectedCollection.Count, actualCollection.Count);

            var count = expectedCollection.Count;

            for (var index = 0; index < count; ++index)
            {
                var expectedItem = expectedCollection[index];
                var actualItem   = actualCollection[index];

                PointAssert.Equal(expectedItem, actualItem);
            }
        }
Пример #2
0
        // PUBLIC METHODS ///////////////////////////////////////////////////
        #region Assert Methods
        public static void Equal(Polygon expected, Polygon actual)
        {
            // Handle when 'expected' is null.
            if (expected == null)
            {
                Assert.Null(actual);
                return;
            }
            Assert.NotNull(actual);

            PointAssert.Equal(expected.Points, actual.Points);
            CustomDataAssert.Equal(expected.CustomData, actual.CustomData);
        }
Пример #3
0
        // PUBLIC METHODS ///////////////////////////////////////////////////
        #region Assert Methods
        public static void Equal(Line expected, Line actual)
        {
            // Handle when 'expected' is null.
            if (expected == null)
            {
                Assert.Null(actual);
                return;
            }
            Assert.NotNull(actual);

            PointAssert.Equal(expected.Point1, actual.Point1);
            PointAssert.Equal(expected.Point2, actual.Point2);
            CustomDataAssert.Equal(expected.CustomData, actual.CustomData);
        }