AreEqual() публичный статический Метод

public static AreEqual ( object first, object second ) : void
first object
second object
Результат void
Пример #1
0
        public void WithEmptyDicts_ShouldBeEqual()
        {
            var stats     = new GamesStatistic(new Dictionary <WinCombination, int>());
            var sameStats = new GamesStatistic(new Dictionary <WinCombination, int>());

            ObjectAssert.AreEqual(stats, sameStats);
        }
        public void WithEmptyCollections_ShouldBeEqual()
        {
            var addressBook     = new AddressBook(new MultilineAddress[0]);
            var sameAddressBook = new AddressBook(new MultilineAddress[0]);

            ObjectAssert.AreEqual(addressBook, sameAddressBook);
        }
Пример #3
0
        public void WithEmptySets_ShouldBeEqual()
        {
            var winCombination     = new WinCombination(1, new HashSet <int> {
            });
            var sameWinCombination = new WinCombination(1, new HashSet <int> {
            });

            ObjectAssert.AreEqual(winCombination, sameWinCombination);
        }
Пример #4
0
        public void ShouldUseCustomComparer()
        {
            var winCombination = new MathcingAnythingWinCombination(1, new HashSet <int> {
                1, 2, 3
            });
            var otherWinCombination = new MathcingAnythingWinCombination(1, new HashSet <int> {
                1, 2, 333
            });

            ObjectAssert.AreEqual(winCombination, otherWinCombination);
        }
Пример #5
0
        public void WithSameValuesInCollections_ShouldBeEqual()
        {
            var winCombination = new WinCombination(1, new HashSet <int> {
                1, 2, 3
            });
            var shuffledWinCombination = new WinCombination(1, new HashSet <int> {
                3, 2, 1
            });

            ObjectAssert.AreEqual(winCombination, shuffledWinCombination);
        }
Пример #6
0
        public void ShouldUseCustomComparer()
        {
            var stats = new MathcingAnythingGamesStatistic(new Dictionary <WinCombination, int>()
            {
                [new WinCombination(1, new HashSet <int> { 1, 2 })] = 3,
            });
            var otherStats = new MathcingAnythingGamesStatistic(new Dictionary <WinCombination, int>()
            {
                [new WinCombination(1, new HashSet <int> { 1, 2 })] = 333
            });

            ObjectAssert.AreEqual(stats, otherStats);
        }
        public void WithSameValuesInCollections_ShouldBeEqual()
        {
            var addressBook = new AddressBook(new[] {
                GetRedSquareAddress(),
                GetEiffelTowerAddress("Paris"),
            });
            var shuffledAddressBook = new AddressBook(new[] {
                GetEiffelTowerAddress("paris"),
                GetRedSquareAddress()
            });

            ObjectAssert.AreEqual(addressBook, shuffledAddressBook);
        }
Пример #8
0
        public void WithSameValuesInCollections_ShouldBeEqual()
        {
            var stats = new GamesStatistic(new Dictionary <WinCombination, int>()
            {
                [new WinCombination(1, new HashSet <int> { 1, 2 })] = 3,
                [new WinCombination(2, new HashSet <int> { 1, 7 })] = 4
            });
            var sameStats = new GamesStatistic(new Dictionary <WinCombination, int>()
            {
                [new WinCombination(1, new HashSet <int> { 1, 2 })] = 3,
                [new WinCombination(2, new HashSet <int> { 1, 7 })] = 4
            });

            ObjectAssert.AreEqual(stats, sameStats);
        }