Beispiel #1
0
        public void GetDataTypeTests(string typeName)
        {
            Type type = DataTypeDefinitionExtensions.GetTypeByName(typeName);

            Assert.NotNull(type);

            this.Output.WriteLine(type.FullName);
        }
Beispiel #2
0
        public BaseValidator Date_Create_PassedTests()
        {
            Type type = DataTypeDefinitionExtensions.GetTypeByName("Date");

            Assert.NotNull(type);

            BaseValidator src = (BaseValidator)Activator.CreateInstance(type);

            Assert.NotNull(src);
            return(src);
        }
Beispiel #3
0
        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);
            }
        }
Beispiel #4
0
        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);
                }
            }
        }