コード例 #1
0
        public void GetConnectionStringFromConfigUsingInValidConnectionStringName()
        {
            Action sut = () => MongoHelpers.GetConnectionStringFromConfig("My.MissingPersistence");

            sut.ShouldThrow <ConfigurationErrorsException>();
        }
コード例 #2
0
        public void GetConnectionStringFromConfigUsingValidConnectionString()
        {
            var result = MongoHelpers.GetConnectionStringFromConfig("NServiceBus/Persistence/MongoDB");

            result.Should().Be("mongodb://localhost:27017");
        }