public void GetDataTypeTests(string typeName) { Type type = DataTypeDefinitionExtensions.GetTypeByName(typeName); Assert.NotNull(type); this.Output.WriteLine(type.FullName); }
public BaseValidator Date_Create_PassedTests() { Type type = DataTypeDefinitionExtensions.GetTypeByName("Date"); Assert.NotNull(type); BaseValidator src = (BaseValidator)Activator.CreateInstance(type); Assert.NotNull(src); return(src); }
public void IdentifierFromType_PassedTests(int len, string value) { string dataType = "Identifier"; Type type = DataTypeDefinitionExtensions.GetTypeByName(dataType); Assert.NotNull(type); if (Activator.CreateInstance(type, new object[] { 0, len }) is BaseValidator src) { src.Value = value; Assert.True(src.IsValid); } }
public void IdentifierExtendedFromType(int len, string value, bool shallPass) { string dataType = "IdentifierExtended"; Type type = DataTypeDefinitionExtensions.GetTypeByName(dataType); Assert.NotNull(type); if (Activator.CreateInstance(type, new object[] { 0, len }) is BaseValidator src) { src.Value = value; if (shallPass) { Assert.True(src.IsValid); } else { Assert.False(src.IsValid); } } }