public void CanBind_Primitive() { var context = Substitute.For <IModelBinderContext>(); context.ModelType.Returns(typeof(int)); var binder = new ArrayModelBinder(); Assert.False(binder.CanBind(context)); }
public void CanBind_List() { var context = Substitute.For <IModelBinderContext>(); context.ModelType.Returns(typeof(IEnumerable <int>)); var binder = new ArrayModelBinder(); Assert.False(binder.CanBind(context)); }
public void CanBind_IntArray() { var context = Substitute.For <IModelBinderContext>(); context.ModelType.Returns(typeof(int[])); var binder = new ArrayModelBinder(); Assert.True(binder.CanBind(context)); }