コード例 #1
0
        public void RegisterMongoDb_Requires_Config()
        {
            // arrange
            ContainerBuilder cb = new ContainerBuilder();

            // act & assert
            Assert.Throws <ArgumentNullException>(() => MongoDbContainerBuilderExtensions.RegisterMongoDbConnection(cb, null));
        }
コード例 #2
0
        public void RegisterMongoDb_Requires_Builder()
        {
            // arrange
            IConfiguration config = new ConfigurationBuilder().Build();

            // act & assert
            Assert.Throws <ArgumentNullException>(() => MongoDbContainerBuilderExtensions.RegisterMongoDbConnection(null, config));
        }