anchor.diff:  	}
   
   	public void function testInsertAndFind() skip="isNotSupported" {
  -		var mongo = MongoDBConnect("test",variables.mongoDB.host,variables.mongoDB.port);
  -		var coll = mongo.getCollection("test");
  +		var coll = db.getCollection("test");
   		var docs = [
   			 {"_id":1, "name":"One"}
   			,{"_id":2, "name":"Two"}
  
positive.code: 	}
  
  	public void function testUpdate() skip="isNotSupported" {
  		var mongo = MongoDBConnect("test",variables.mongoDB.host,variables.mongoDB.port);
  		var coll = mongo.getCollection("test");
  		var docs = [
  			 {"_id":1, "name":"One"}
  			,{"_id":2, "name":"Two"}
  			,{"_id":3, "name":"Three"}
  			,{"_id":4, "name":"Four"}
  			,{"_id":5, "name":"Five"}
  		]
  
  		coll.drop();
  		coll.insert(docs);
  
  		// single update with criteria
  		coll.update({"_id":1}, {"$set":{"updated":true}});
  		$assert.isTrue( coll.findOne({"_id":1}).updated );
  
  		// reset data
  		coll.drop();
  		coll.insert(docs);
  
  		// single update, no criteria 
  		coll.update({},{"$set":{"updated":true}});
  		$assert.isEqual(1, coll.find({"updated":true}).size());
  
  		// reset data
  		coll.drop();
  		coll.insert(docs);
  
  		// multi update, no criteria 
  		coll.update({},{"$set":{"updated":true}},false,true);
  		$assert.isEqual(5, coll.find({"updated":true}).size());
  	}
  
  }
  </cfscript>
negative.code: 		}
  		return mongoDB;
  	}
  
  	private any function resetTestCollection() {
  		var coll = db.getCollection("test");
  		var docs = [
  			 {"_id":1, "grp":1, "name":"One"}
  			,{"_id":2, "grp":1, "name":"Two"}
  			,{"_id":3, "grp":1, "name":"Three"}
  			,{"_id":4, "grp":2, "name":"Four"}
  			,{"_id":5, "grp":2, "name":"Five"}
  		];
  
  		coll.drop();
  		coll.insert(docs);
  
  		return coll;		
  	}
  	
  	// public function setUp(){}
  
  	public function beforeTests() {
  		db = MongoDBConnect("test",variables.mongoDB.host,variables.mongoDB.port);
  	}
  	
  	//public function afterTests(){}
  	
  
  	public void function testConnectByArgs() skip="isNotSupported" {
  		var mongo = MongoDBConnect("test",variables.mongoDB.host,variables.mongoDB.port);
  		assertEquals("test",mongo.getName());
  	}
  
  	public void function testConnectByURI() skip="isNotSupported" {
  		var mongo = MongoDBConnect("test","mongodb://#variables.mongoDB.host#:#variables.mongoDB.port#");
  		assertEquals("test",mongo.getName());
  	}
  
  	// skip until authenticate is implemented
  	public void function testAuthenticate() skip="true" {
  		var mongo = MongoDBConnect("test",variables.mongoDB.host,variables.mongoDB.port);
  		mongo.authenticate(variables.mongoDB.user,variables.mongoDB.pass);
  	}
  
  	public void function testIdConversion() skip="isNotSupported" {
  		var content = {'name':'Susi'};
  		db.getCollection("test").insert(content);
  		
  		//Get by Name
  		var id = db['test'].findOne({'name':'Susi'});
  		assertEquals("Susi",id.name)
  		
  		//Get by Id : fails
  		var byid = db['test'].findOne({'_id':id});
  		assertEquals(isNull(byid),true)
  	}
  
  