public void SetParameters_ParamWhitespace_Error() { CustomAssert.ThrowsException<ConstraintConfigurationException>(() => { TypeConstraint c = new TypeConstraint(); c.SetParametersInternal(new string[] { " " }, ParameterDataType.Xml); }); }
public void SetParameters_Success() { string type = typeof(System.UriKind).AssemblyQualifiedName; TypeConstraint c = new TypeConstraint(); c.SetParametersInternal(new string[] { type }, ParameterDataType.Xml); Assert.AreEqual(type, c.TypeName); Assert.IsNotNull(c.ResolvedType); }