dotnet-object-storage/PoweredSoft.ObjectStorage.MongoDB.Tests/Mock/MongoDatabaseFactory.cs
David Lebee b789b367c2 initial
2019-02-12 17:39:16 -05:00

27 lines
636 B
C#

using System;
using MongoDB.Driver;
namespace PoweredSoft.ObjectStorage.MongoDB.Tests.Mock
{
public class MongoDatabaseFactory
{
public static IMongoDatabase GetDatabase()
{
var client = GetClient();
var db = client.GetDatabase("acme");
return db;
}
public static MongoObjectStorageClient GetObjectStorageClient()
{
return new MongoObjectStorageClient(GetDatabase());
}
public static IMongoClient GetClient()
{
var mongoClient = new MongoClient();
return mongoClient;
}
}
}