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 BindingShouldBeAddedToBindings() { KernelConfigurationMock.Setup(p => p.AddBinding(BindingMock.Object)); NinjectModule.AddBinding(BindingMock.Object); Assert.Equal(1, NinjectModule.Bindings.Count); Assert.True(NinjectModule.Bindings.Contains(BindingMock.Object)); }
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 BindingShouldNotBeAddedToBindings() { Assert.Throws <NullReferenceException>(() => NinjectModule.AddBinding(BindingMock.Object)); Assert.Empty(NinjectModule.Bindings); }
public void NullReferenceExceptionShouldBeThrown() { Assert.Throws <NullReferenceException>(() => NinjectModule.AddBinding(BindingMock.Object)); }