mongo-dart / tests / objectory / ObjectoryImplWsTest.dart

Diff from to

tests/objectory/ObjectoryImplWsTest.dart

 #library("ObjectoryWS");
 #import("../../lib/objectory/ObjectoryLib_ws.dart");
 #import("../../lib/bson/bson.dart");
-#import('../../third_party/testing/unittest/unittest_vm.dart');
+//#import('../../../../dart/dart-sdk/lib/unittest/unittest.dart');
 #source("DomainModel.dart");
 Future<bool> setUpObjectory(){
   var res = new Completer();
 //  objectory.clearFactories();
-  objectory.open(url:"ws://localhost:8080").then((_){    
+  objectory.open(url:"ws://localhost:8080").then((_){
+//  new Future.immediate(true).then((_){    
 //    objectory.dropDb();
     print("I'm here");
-    registerClasses();
-    res.complete(true);
+//    registerClasses();
+//    res.complete(true);
   });    
   return res.future;
 }
-void testInsertionAndUpdate(){
+/*void testInsertionAndUpdate(){
   Author author = new Author();  
   author.name = 'Dan';
   author.age = 3;
       expect(sonFromObjectory.mother).equals(null);
       callbackDone();
     });    
-  });
+  });  
 }
+*/
 main(){  
   setUpObjectory().then((_) {    
-    objectory.onMessageFuture.then((_){
-      print("Now here ${objectory.socketId}");
-      objectory.save(new Person());    
-      Person person = new Person();
-      person.id = new ObjectId();
-      objectory.remove(person);
-//    print("End ${objectory.webSocket.bufferedAmount}");
-      objectory.webSocket.send("closing");
-      objectory.webSocket.close(123,"Normal closing");      
-      return;
-      });
+//    objectory.onMessageFuture.then((_){
+//      print("Now here ${objectory.socketId}");      
+//      Person person = new Person();
+//      print(person);
+//      person.firstName1 = "asdfasdf";
+//      print(person);
+//      person.fistName = 'Vadim';
+//      objectory.save(person);                
+      1.foo();
+      print("Before closing");
+      objectory.close();      
+//      return;
+//      });
     return;
-    group("ObjectoryVM", ()  {
+  /* 
+   group("ObjectoryVM", ()  {
       asyncTest("testCompoundObject",1,testCompoundObject);   
       asyncTest("testInsertionAndUpdate",1,testInsertionAndUpdate);         
       asyncTest("testObjectWithLinks",1,testObjectWithLinks);               
       test("testNewInstanceMethod",testNewInstanceMethod);   
       test("testMap2ObjectMethod",testMap2ObjectMethod);       
     });  
+*/    
   });    
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.