public void InsertTest1() { DBObject a = new DBObject(); DBObject b = new DBObject("a", 7); DBObject c = new DBObject("78", "car"); IList target = new DBObjectArray(a, c) as IList; target.Insert(1, b); target.IndexOf(b).Should().Be(1); }
public void InsertTest() { DBObject a = new DBObject(); DBObject b = new DBObject("a", 7); DBObject c = new DBObject("78", "car"); DBObjectArray target = new DBObjectArray(a, c); target.IndexOf(a).Should().Be(0); target.IndexOf(c).Should().Be(1); target.Insert(1, b); target.IndexOf(a).Should().Be(0); target.IndexOf(b).Should().Be(1); target.IndexOf(c).Should().Be(2); target.Count.Should().Be(3); }