Example #1
0
        public void TestIdentifier()
        {
            Assert.True(NamingHelper.IsIdentifier("_"));
            Assert.True(NamingHelper.IsIdentifier("a"));
            Assert.True(NamingHelper.IsIdentifier("aThisIsOk"));
            Assert.True(NamingHelper.IsIdentifier("aThis_IsOk"));
            Assert.True(NamingHelper.IsIdentifier("ThisIsOk"));
            Assert.True(NamingHelper.IsIdentifier("T"));
            Assert.True(NamingHelper.IsIdentifier("_a"));
            Assert.True(NamingHelper.IsIdentifier("_aThisIsOk987"));

            Assert.False(NamingHelper.IsIdentifier(""));
            Assert.False(NamingHelper.IsIdentifier("9"));
            Assert.False(NamingHelper.IsIdentifier("a "));
            Assert.False(NamingHelper.IsIdentifier("a x"));
            Assert.False(NamingHelper.IsIdentifier("9aaaaa"));
            Assert.False(NamingHelper.IsIdentifier("9aa.aaa"));
            Assert.False(NamingHelper.IsIdentifier("9aa.aaa"));
        }