public void Create_Success() { var provider = new MongoDatabaseProvider(Options.Create(_options)); var client = provider.Create(); Assert.AreEqual(client.DatabaseNamespace.DatabaseName, _options.DatabaseName); }
public MongoRepositoryTest() { Provider = new MongoDatabaseProvider(Options.Create(MongoOptions)); Client = Provider.Create(); }
/// <summary> /// Construtor do repositório. /// </summary> /// <param name="mongoDatabaseProvider">Fornecedor da conexão com o banco de dados.</param> public MongoRepository(MongoDatabaseProvider mongoDatabaseProvider) { _mongoDatabaseProvider = mongoDatabaseProvider; _collection = _mongoDatabaseProvider.Create().GetCollection <T>(TableName()); }