예제 #1
0
 public void ContainsTest1()
 {
     DBObject a = new DBObject();
     DBObject b = new DBObject("a", 7);
     DBObject c = new DBObject("78", "car");
     DBObjectArray target = new DBObjectArray(a, c);
     target.Contains(a).Should().Be(true);
     target.Contains(b).Should().Be(false);
 }
예제 #2
0
 public void ContainsTest2()
 {
     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.Contains(a).Should().BeTrue();
     target.Contains(b).Should().BeFalse();
 }
예제 #3
0
 public void ContainsTest()
 {
     DBObject a = new DBObject();
     DBObject b = new DBObject("a", 7);
     DBObject c = new DBObject("78", "car");
     DBObjectArray target = new DBObjectArray(a, b, c);
     target.Contains(new KeyValuePair<string, object>("0",a)).Should().Be(true);
     target.Contains(new KeyValuePair<string, object>("1", a)).Should().Be(false);
     new Action(() => target.Contains(new KeyValuePair<string, object>("a", a))).ShouldThrow<Exception>();
     target.Contains(new KeyValuePair<string, object>("30", a)).Should().Be(false);
 }