public void GetPossibleBinderInstance_Match_ReturnsBinder() { // Act IModelBinder binder = ModelBindingHelper.GetPossibleBinderInstance( typeof(List <int>), typeof(List <>), typeof(SampleGenericBinder <>) ); // Assert Assert.IsType <SampleGenericBinder <int> >(binder); }
public void GetPossibleBinderInstance_NoMatch_ReturnsNull() { // Act IModelBinder binder = ModelBindingHelper.GetPossibleBinderInstance( typeof(ArraySegment <int>), typeof(List <>), typeof(SampleGenericBinder <>) ); // Assert Assert.Null(binder); }