示例#1
0
        private char[] Get_wechatno_chararray()
        {
            List <char> chars = new List <char>()
            {
                '_', '-'
            };

            chars.AddRange(CommonData.ASCII_Number());
            chars.AddRange(CommonData.ASCII_UpperEnglish());
            chars.AddRange(CommonData.ASCII_LowerEnglish());
            return(chars.ToArray());
        }
 private CaseModel ExeEvent_Section_ASCII_String()
 {
     return(new CaseModel()
     {
         NameSign = @"部分的 ASCII 码字符",
         ExeEvent = () => {
             PrintMethod(@"所有常用字符:", CommonData.ASCII_ALL());
             PrintMethod(@"常用文本字符", CommonData.ASCII_WordText());
             PrintMethod(@"特殊字符:", CommonData.ASCII_Special());
             PrintMethod(@"阿拉伯数字:", CommonData.ASCII_Number());
             PrintMethod(@"小写英文:", CommonData.ASCII_LowerEnglish());
             PrintMethod(@"大写英文:", CommonData.ASCII_UpperEnglish());
         },
     });
 }
示例#3
0
        public void InsertData()
        {
            bool result = bllUser.Insert(new ModelUser()
            {
                Email       = RandomData.GetString(RandomData.GetInt(5, 10)),
                TelePhone   = RandomData.GetString(CommonData.ASCII_Number(), 12),
                MobilePhone = RandomData.GetString(CommonData.ASCII_Number(), 11),
                NickName    = RandomData.GetString(CommonData.ASCII_UpperEnglish(), RandomData.GetInt(5, 16)),
                Password    = RandomData.GetString(30),
                RealName    = RandomData.GetChineseString(RandomData.GetInt(2, 4)),
                Remark      = RandomData.GetString(RandomData.GetInt(10, 81)),
                Sex         = RandomData.Item(ConvertTool.EnumForeachArray <ModelUser.SexEnum>()),
                TimeAdd     = RandomData.GetDateTime(),
            });

            Print.WriteLine(result);
        }
示例#4
0
        public void InsertData()
        {
            int  id     = 0;
            bool result = bllUser.Insert(new ModelUser()
            {
                Email       = RandomData.GetString(10),
                TelePhone   = RandomData.GetString(CommonData.ASCII_Number(), 12),
                MobilePhone = RandomData.GetString(CommonData.ASCII_Number(), 11),
                NickName    = RandomData.GetString(CommonData.ASCII_UpperEnglish(), 30),
                Password    = RandomData.GetString(100),
                RealName    = RandomData.GetString(CommonData.ASCII_UpperEnglish(), 10),
                Remark      = RandomData.GetString(200),
                Sex         = RandomData.Item(ConvertTool.EnumForeachArray <ModelUser.SexEnum>()),
                TimeAdd     = RandomData.GetDateTime(),
            }, out id);

            Print.WriteLine(result);
            Print.WriteLine(id);
        }
示例#5
0
        public CaseModel Func_ASCII_Special()
        {
            return(new CaseModel()
            {
                NameSign = @"特别字符",
                ExeEvent = () => {
                    StringBuilder str = new StringBuilder();
                    foreach (char c in CommonData.ASCII_Special())
                    {
                        str.AppendFormat("{{ @\"{0}\", @\"{1}\" }},\n", c, RandomData.GetString(CommonData.ASCII_UpperEnglish(), 5));
                    }
                    string path = PathHelp.CreateUseFilePath(@"/auto/Tools/Test_CommonData", @"Func_ASCII_Special.txt");
                    this.ClearAndWriteFile(path, str.ToString());

                    Dictionary <string, string> dic = FileNameFormat_Dictionary();
                    return true;
                },
            });
        }