Exemplo n.º 1
0
        public void When_component_is_not_registered_it_should_not_be_retrievable()
        {
            var kernel = new StandardKernel();
            var configuration = new NinjectConfiguration(kernel);

            IReplicant component;
            var success = configuration.TryGet(out component);

            success.Should().BeFalse();
            component.Should().BeNull();
        }
Exemplo n.º 2
0
        public void When_component_is_not_registered_it_should_not_be_retrievable()
        {
            var kernel        = new StandardKernel();
            var configuration = new NinjectConfiguration(kernel);

            IReplicant component;
            var        success = configuration.TryGet(out component);

            success.Should().BeFalse();
            component.Should().BeNull();
        }
Exemplo n.º 3
0
        public void When_component_is_registered_it_should_be_retrievable()
        {
            var kernel = new StandardKernel();
            kernel.Bind<IReplicant>().To<Nexus6>();

            var configuration = new NinjectConfiguration(kernel);

            IReplicant component;
            var success = configuration.TryGet(out component);

            success.Should().BeTrue();
            component.Should().NotBeNull();
            component.Should().BeAssignableTo<IReplicant>();
        }
Exemplo n.º 4
0
        public void When_component_is_registered_it_should_be_retrievable()
        {
            var kernel = new StandardKernel();

            kernel.Bind <IReplicant>().To <Nexus6>();

            var configuration = new NinjectConfiguration(kernel);

            IReplicant component;
            var        success = configuration.TryGet(out component);

            success.Should().BeTrue();
            component.Should().NotBeNull();
            component.Should().BeAssignableTo <IReplicant>();
        }