public void CallShouldBeDelegatedToKernelConfiguration()
            {
                KernelConfigurationMock.Setup(p => p.AddBinding(BindingMock.Object));

                NinjectModule.AddBinding(BindingMock.Object);

                KernelConfigurationMock.Verify(p => p.AddBinding(BindingMock.Object), Times.Once());
            }
            public void NoArgumentNullCheckShouldBePerformed()
            {
                const IBinding binding = null;

                KernelConfigurationMock.Setup(p => p.AddBinding(binding));

                NinjectModule.AddBinding(binding);

                KernelConfigurationMock.Verify(p => p.AddBinding(binding), Times.Once());
            }
            public void CallShouldBeDelegatedToKernelConfiguration()
            {
                var service = typeof(string);

                KernelConfigurationMock.Setup(p => p.Unbind(service));

                NinjectModule.Unbind(service);

                KernelConfigurationMock.Verify(p => p.Unbind(service), Times.Once());
            }
            public void NoArgumentNullCheckShouldBePerformed()
            {
                const Type service = null;

                KernelConfigurationMock.Setup(p => p.Unbind(service));

                NinjectModule.Unbind(service);

                KernelConfigurationMock.Verify(p => p.Unbind(service), Times.Once());
            }
            public void BindingsShouldBeRemovedFromKernelConfiguration()
            {
                NinjectModule.Bindings.Add(BindingMock.Object);

                KernelConfigurationMock.Setup(p => p.RemoveBinding(BindingMock.Object));

                NinjectModule.OnUnload();

                KernelConfigurationMock.Verify(p => p.RemoveBinding(BindingMock.Object), Times.Once());
            }
            public void ComponentsShouldBeAssigned()
            {
                KernelConfigurationMock.Setup(p => p.Components).Returns(ComponentsMock.Object);

                NinjectModule.OnLoad(KernelConfigurationMock.Object, SettingsMock.Object);

                Assert.NotNull(NinjectModule.Components);
                Assert.Same(ComponentsMock.Object, NinjectModule.Components);

                KernelConfigurationMock.Verify(p => p.Components, Times.Once());
            }