public void Ctor_ClientException_Test()
 {
     // Arrange
     // Action
     // Assert
     _target = new MongoMockRepositoryMock(null, null, "");
 }
        public void Ctor_Exception_Test()
        {
            // Arrange
            var client = Substitute.For <IMongoClient>();

            // Action
            // Assert
            _target = new MongoMockRepositoryMock(client, null, "");
        }
        public void Init()
        {
            var connectionSettings = Substitute.For <IConnectionSettings>();

            connectionSettings.Database.Returns("DataBaseTest");

            var client     = Substitute.For <IMongoClient>();
            var dataBase   = Substitute.For <IMongoDatabase>();
            var collection = Substitute.For <IMongoCollection <ModelMock> >();

            dataBase.GetCollection <ModelMock>("collectionNameTest").Returns(collection);

            client.GetDatabase(connectionSettings.Database).Returns(dataBase);

            _target = new MongoMockRepositoryMock(client, connectionSettings, "collectionNameTest");
        }