Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (32 sloc) 1.162 kb
using System;
using System.Configuration;
using System.Text;
using NUnit.Framework;
using MongoDB;
namespace MongoDB.GridFS
public abstract class GridTestBase : MongoTestBase
/// <summary>
/// Comma separated list of collections to clean at startup.
/// </summary>
public abstract string TestFileSystems{get;}
/// <summary>
/// Turns the TestFileSystems string into a comma delimited set of collections
/// </summary>
public override string TestCollections {
get {
StringBuilder sb = new StringBuilder();
foreach(string fs in this.TestFileSystems.Split(',')){
sb.Append(fs + ".files,");
sb.Append(fs + ".chunks,");
sb.Remove(sb.Length - 1,1); //remove last ,
return sb.ToString();
public long CountChunks(string filesystem, Object fileid){
return DB[filesystem + ".chunks"].Count(new Document().Add("files_id", fileid));
Jump to Line
Something went wrong with that request. Please try again.