Commits

Liam Staskawicz  committed 82cfe6e

* add MongoTest so all db related tests can use the same Mongo & DB instances

  • Participants
  • Parent commits 6e5f66e

Comments (0)

Files changed (4)

File test/CollectionTest.fan

 **
 **  CollectionTest
 **
-class CollectionTest : Test
+class CollectionTest : MongoTest
 {
-  Mongo mongo := Mongo()
-  DB db := mongo.db("collectotron")
+  
   Collection c := db["tester"]
   
   override Void setup()

File test/CursorTest.fan

 **
 **  CursorTest
 **
-class CursorTest : Test
+class CursorTest : MongoTest
 {
-  Mongo mongo := Mongo()
-  DB db := mongo.db("curses")
   
   override Void setup()
   {

File test/DBTest.fan

 **
 **  DBTest
 **
-class DBTest : Test 
+class DBTest : MongoTest 
 {
-  Mongo mongo := Mongo()
-  DB db := mongo.db("testeroo")
   const Str testuser := "fantester"
   const Str testpass := "fanpass"
   
   
   Void testServerStatus()
   {
-    ss := db.serverStatus
+    ss := db.serverStatus()
     verify(ss.keys.containsAll(["uptime", "globalLock", "mem"]))
   }
   

File test/MongoTest.fan

+
+
+
+
+**
+**  MongoTest
+**
+class MongoTest : Test
+{
+  static const Mongo mongo := Mongo()
+  static const DB db := mongo.db("testeroo")
+  
+}