Line data Source code
1 : #region Copyright
2 : // // -----------------------------------------------------------------------
3 : // // <copyright company="cdmdotnet Limited">
4 : // // Copyright cdmdotnet Limited. All rights reserved.
5 : // // </copyright>
6 : // // -----------------------------------------------------------------------
7 : #endregion
8 :
9 : using Cqrs.Mongo.Factories;
10 :
11 : namespace Cqrs.Ninject.Mongo.Configuration
12 : {
13 : /// <summary>
14 : /// A <see cref="MongoModule"/> that assumes the connection string is keyed "MongoDb-Test".
15 : /// This will generated a random suffix to the database name so as to create a unique store for testing against.
16 : /// </summary>
17 : public class TestMongoModule : MongoModule
18 1 : {
19 : /// <summary>
20 : /// Register the all factories
21 : /// </summary>
22 1 : public override void RegisterFactories()
23 : {
24 : Bind<IMongoDataStoreConnectionStringFactory>()
25 : .To<TestMongoDataStoreConnectionStringFactory>()
26 : .InSingletonScope();
27 : }
28 : }
29 : }
|