Source

mongo-dart / tests / SelectorBuilderTest.dart

Full commit
vadimtsushko a8aade4 
vadimtsushko 51713e5 
vadimtsushko a8aade4 
vadimtsushko 51713e5 

vadimtsushko 2b81e76 
vadimtsushko 51713e5 
vadimtsushko 5b0aeb6 




vadimtsushko a8aade4 

vadimtsushko 51713e5 



vadimtsushko a8aade4 
vadimtsushko 51713e5 
#library("HelperTest");
#import("../lib/mongo.dart");
#import("../lib/bson/bson.dart");
#import("dart:io");
#import("dart:builtin");
#import('../third_party/unittest/unittest.dart');
testSelectorBuilderCreation(){
  SelectorBuilder selector = query();
  expect(selector is Map && selector.isEmpty()).isTrue();
}
testSelectorBuilderOnObjectId(){
  ObjectId id = new ObjectId();
  SelectorBuilder selector = query().id(id);
  expect(selector is Map && selector.isEmpty()).isFalse();
}
main(){  
  group("DbCollection tests:", (){
    test("testSelectorBuilderCreation",testSelectorBuilderCreation);
    test("testSelectorBuilderOnObjectId",testSelectorBuilderOnObjectId);    
  });
}