public void ShouldSetMethodParameterAndDeclaredType() { var target = new OptionalParameterTarget(TestMethod_OptionalStringWithDefault_Info.GetParameters()[0]); Assert.NotNull(target.MethodParameter); Assert.Equal(typeof(string), target.DeclaredType); }
public void ShouldCorrectlyUseDefaultIntForOptionalArgWithNoDefault() { var target = new OptionalParameterTarget(TestMethod_OptionalIntWithNoDefault_Info.GetParameters()[0]); Assert.Equal(0, target.Value); }
public void ShouldCorrectlyUseStringArgumentWithDefault() { var target = new OptionalParameterTarget(TestMethod_OptionalStringWithDefault_Info.GetParameters()[0]); Assert.Equal("hello world", target.Value); }