public async Task ForAnInvalidPassword() { var config = new TestingConfiguration() .WithWrongMongoDbPassword() .Build(); var thrownEx = await TryToAddAlbum(config); thrownEx.Message.Should().Be("Failed to authenticate with MongoDB. Please verify the configuration for MongoDBUsername and MongoDBPassword"); thrownEx.InnerException.Should().BeOfType <MongoAuthenticationException>(); }
public async Task ForAnInvalidHostScheme() { var config = new TestingConfiguration() .WithWrongMongoDbHostScheme() .Build(); var thrownEx = await TryToAddAlbum(config); thrownEx.Should().NotBeNull(); thrownEx.Message.Should().Be("Failed to connect to MongoDB. Please verify the configuration for MongoDBHostScheme"); thrownEx.InnerException.Should().BeOfType <MongoConfigurationException>(); }