public void RemoveAt_OfAnInstanceInitializedWithReadOnlyList_ThrowsException() { // Arrange var c0 = new NonNullCollection <IUnit>(new IUnit[] { MutableUnit.Create("foo"), MutableUnit.Create("bar") }.ToList().AsReadOnly()); // Act // Assert Assert.That(() => { c0.RemoveAt(1); }, Throws.InstanceOf <NotSupportedException>()); }
public void RemoveAt_OfAnInstanceInitializedWithNormalList_DoesNotThrowException() { // Arrange var c0 = new NonNullCollection <IUnit>(new IUnit[] { MutableUnit.Create("foo"), MutableUnit.Create("bar") }.ToList()); // Act c0.RemoveAt(1); // Assert Assert.That(c0.Count, Is.EqualTo(1)); }