コード例 #1
0
        [Test] public void ConvertAllConvertsToAnotherCopyOnWriteList()
        {
            var sut       = new CopyOnWriteList <T>(Samples);
            var converted = sut.ConvertAll <object>(i => i);

            CollectionAssert.AreEqual(sut, converted);
            converted[0] = TestData <T> .M1;
            Assert.That(sut[0], Is.Not.EqualTo(TestData <T> .M1));
        }
コード例 #2
0
        [Test] public void ConvertAllChokesOnNullConvertor()
        {
            var sut = new CopyOnWriteList <T>();

            Assert.Catch <ArgumentNullException>(() => sut.ConvertAll <object>(null));
        }