public void ShouldBeQueryModelBinder() { var modelBinderProviderContextMock = new MockModelBinderProviderContext(typeof(RSqlQuery <Customer>)); var expected = new RSqlQueryModelBinderProvider(); expected.GetBinder(modelBinderProviderContextMock) .Should().BeOfType <BinderTypeModelBinder>(); }
public void ShouldBeNotQueryModelBinder() { var modelBinderProviderContextMock = new MockModelBinderProviderContext(typeof(string)); var expected = new RSqlQueryModelBinderProvider(); expected.GetBinder(modelBinderProviderContextMock) .Should().BeNull(); modelBinderProviderContextMock = new MockModelBinderProviderContext(typeof(int?)); expected = new RSqlQueryModelBinderProvider(); expected.GetBinder(modelBinderProviderContextMock) .Should().BeNull(); }