Exemplo n.º 1
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"));
        }
Exemplo n.º 3
0
 public void TestRubyFullUpperCase()
 {
     RubyNamingConvention namingConvention = new RubyNamingConvention();
     Assert.AreEqual("id", namingConvention.GetMemberName("ID"));
     Assert.AreEqual("hellocruelworld", namingConvention.GetMemberName("HELLOCRUELWORLD"));
 }
Exemplo n.º 4
0
 public void TestRubyMoreComplexName()
 {
     RubyNamingConvention namingConvention = new RubyNamingConvention();
     Assert.AreEqual("hello_cruel_world", namingConvention.GetMemberName("HelloCruelWorld"));
 }
Exemplo n.º 5
0
 public void TestRubySimpleName()
 {
     RubyNamingConvention namingConvention = new RubyNamingConvention();
     Assert.AreEqual("test", namingConvention.GetMemberName("Test"));
 }