Пример #1
0
        public void Non_existing_components_should_return_false()
        {
            var serviceCollection = new ServiceCollection();

            InitializeBuilder(serviceCollection);

            Assert.False(serviceCollection.HasComponent(typeof(NonExistingComponent)));
        }
Пример #2
0
        public void Builders_should_not_determine_existence_by_building_components()
        {
            var serviceCollection = new ServiceCollection();

            InitializeBuilder(serviceCollection);

            Assert.True(serviceCollection.HasComponent(typeof(ExistingComponentWithUnsatisfiedDependency)));
        }
Пример #3
0
        public void Existing_components_should_return_true()
        {
            var serviceCollection = new ServiceCollection();

            InitializeBuilder(serviceCollection);

            Assert.True(serviceCollection.HasComponent(typeof(ExistingComponent)));
        }