コード例 #1
0
        public void IntegratesWithTestHost()
        {
            var host = TestHost.For(typeof(TestHostTests)).Create()
                       .Configure(c => c.ConfigureRocketSurgery(x => x.Set(new DryIocOptions()
            {
                NoMoreRegistrationAllowed = false
            }).UseDryIoc().AppendConvention <TestConvention>()));
            var services = host.Build().Services.GetRequiredService <IContainer>();

            // We are using dryioc...
            Populate(services);

            Container.IsRegistered <AService>().Should().BeTrue();
        }