public void CanCallMethodWithDateTime() { var p = new ParameterBinder(typeof(OthersTypes), "MDateTime", new NameValueCollection { { "something", DateTime.Today.ToString() } }); var instance = new OthersTypes(); p.Invoke(instance); instance.MDateCalled.Should().Be.EqualTo(DateTime.Today); }
public void CanCallMethodWithString() { var p = new ParameterBinder(typeof(OthersTypes), "MString", new NameValueCollection { { "something", "aaa" } }); var instance = new OthersTypes(); p.Invoke(instance); instance.MStringCalled.Should().Be.EqualTo("aaa"); }