Esempio n. 1
0
        public void TestRubyFullUpperCase()
        {
            RubyNamingConvention namingConvention = new RubyNamingConvention();

            Assert.AreEqual("id", namingConvention.GetMemberName("ID"));
            Assert.AreEqual("hellocruelworld", namingConvention.GetMemberName("HELLOCRUELWORLD"));
        }
Esempio n. 2
0
        public void TestRubyWithTurkishCulture()
        {
            using (CultureHelper.SetCulture("tr-TR"))
            {
                RubyNamingConvention namingConvention = new RubyNamingConvention();

                // in Turkish ID.ToLower() returns a localized i, and this fails
                Assert.AreEqual("id", namingConvention.GetMemberName("ID"));
            }
        }
        public void TestRubyWithTurkishCulture()
        {
            System.Threading.Thread.CurrentThread.CurrentCulture       =
                System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("tr-TR");

            RubyNamingConvention namingConvention = new RubyNamingConvention();

            // in Turkish ID.ToLower() returns a localized i, and this fails
            Assert.AreEqual("id", namingConvention.GetMemberName("ID"));
        }
Esempio n. 4
0
        public void TestRubyMoreComplexName()
        {
            RubyNamingConvention namingConvention = new RubyNamingConvention();

            Assert.AreEqual("hello_cruel_world", namingConvention.GetMemberName("HelloCruelWorld"));
        }
Esempio n. 5
0
        public void TestRubySimpleName()
        {
            RubyNamingConvention namingConvention = new RubyNamingConvention();

            Assert.AreEqual("test", namingConvention.GetMemberName("Test"));
        }
Esempio n. 6
0
        public void TestRubyComplexName()
        {
            var namingConvention = new RubyNamingConvention();

            Assert.AreEqual("hello_world", namingConvention.GetMemberName("HelloWorld"));
        }