[Test] public void AddIfAbsentDoesAddWhenNotExist() { var sut = new CopyOnWriteList <T>(Samples); sut.AddIfAbsent(TestData <T> .M1); Assert.IsTrue(sut.Contains(TestData <T> .M1)); }
[Test] public void AddIfAbsentDoesNotAddWhenExist() { var sut = new CopyOnWriteList <T>(Samples); sut.AddIfAbsent(TestData <T> .One); Assert.That(sut.Count, Is.EqualTo(SampleSize)); }