예제 #1
0
		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);
		}
예제 #2
0
		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");
		}