Beispiel #1
0
        public void 複製SafeHashSet至指定陣列_複製成功_複製結果應與原集合相同()
        {
            var       fixure      = new Fixture();
            var       safeHashSet = new SafeHashSet <int>();
            const int count       = 10;

            safeHashSet.AddMany(fixure.Create <int>, count);
            var result = new int[count];

            safeHashSet.CopyTo(result, 0);
            result.Should().BeEquivalentTo(safeHashSet);
        }