public void ConcatToDictionarySafeTestCase2()
        {
            var first = new Dictionary<Int32, Int32>();
            var second = new Dictionary<Int32, Int32>();

            var actual = first.ConcatToDictionarySafe( second );
            Assert.AreEqual( 0, actual.Count );
        }
        public void ConcatToDictionarySafeTest2()
        {
            // ReSharper disable once CollectionNeverUpdated.Local
            var first = new Dictionary <Int32, Int32>();
            // ReSharper disable once CollectionNeverUpdated.Local
            var second = new Dictionary <Int32, Int32>();

            var actual = first.ConcatToDictionarySafe(second);

            Assert.Equal(0, actual.Count);
        }
        public void ConcatToDictionarySafeTestCase1()
        {
            var first = new Dictionary<Int32, Int32>
            {
                { 0, 1 },
                { 1, 2 }
            };
            var second = new Dictionary<Int32, Int32>();

            var actual = first.ConcatToDictionarySafe( second );
            Assert.AreEqual( 2, actual.Count );
            Assert.AreEqual( 1, actual.Count( x => x.Key == 0 && x.Value == 1 ) );
            Assert.AreEqual( 1, actual.Count( x => x.Key == 1 && x.Value == 2 ) );
        }
        public void ConcatToDictionarySafeTestNullCheck()
        {
            var first = new Dictionary <Int32, Int32>
            {
                { 0, 1 },
                { 1, 2 }
            };
            Dictionary <Int32, Int32> second = null;

            // ReSharper disable once AssignNullToNotNullAttribute
            // ReSharper disable once ReturnValueOfPureMethodIsNotUsed
            Action test = () => first.ConcatToDictionarySafe(second);

            test.ShouldThrow <ArgumentNullException>();
        }
        public void ConcatToDictionarySafeTest1()
        {
            var first = new Dictionary <Int32, Int32>
            {
                { 0, 1 },
                { 1, 2 }
            };
            // ReSharper disable once CollectionNeverUpdated.Local
            var second = new Dictionary <Int32, Int32>();

            var actual = first.ConcatToDictionarySafe(second);

            Assert.Equal(2, actual.Count);
            Assert.Equal(1, actual.Count(x => x.Key == 0 && x.Value == 1));
            Assert.Equal(1, actual.Count(x => x.Key == 1 && x.Value == 2));
        }
        public void ConcatToDictionarySafeTest()
        {
            var first = new Dictionary <Int32, Int32>
            {
                { 0, 1 },
                { 1, 2 }
            };
            var second = new Dictionary <Int32, Int32>
            {
                { 2, 3 },
                { 3, 4 }
            };

            var actual = first.ConcatToDictionarySafe(second);

            Assert.Equal(4, actual.Count);
            Assert.Equal(1, actual.Count(x => x.Key == 0 && x.Value == 1));
            Assert.Equal(1, actual.Count(x => x.Key == 1 && x.Value == 2));
            Assert.Equal(1, actual.Count(x => x.Key == 2 && x.Value == 3));
            Assert.Equal(1, actual.Count(x => x.Key == 3 && x.Value == 4));
        }
        public void ConcatToDictionarySafeTestCaseNullCheck()
        {
            var first = new Dictionary<Int32, Int32>
            {
                { 0, 1 },
                { 1, 2 }
            };
            Dictionary<Int32, Int32> second = null;

            Action test = () => first.ConcatToDictionarySafe( second );

            test.ShouldThrow<ArgumentNullException>();
        }