示例#1
0
        private void StrictSetDiffer <S1, S2>()
            where S1 : IStrictSet <int>, new()
            where S2 : IStrictSet <int>, new()
        {
            var origin = new S1();
            var other  = new S2();

            Fill(origin, 0, 5000);
            Fill(other, 4000, 5000);
            var result = origin.Differ(other);

            for (var i = 0; i < 4000; i++)
            {
                Assert.True(origin.Contains(i));
                Assert.True(result.Contains(i));
            }
            for (var i = 4000; i < 5000; i++)
            {
                Assert.False(origin.Contains(i));
                Assert.False(result.Contains(i));
            }
        }