コード例 #1
0
 public void TestToProperCaseWithPossessiveS()
 {
     Assert.AreEqual("John's House", CaseConverter.ToProperCase("john's house"));
 }
コード例 #2
0
 public void TestToProperCaseWithMixedCase()
 {
     Assert.AreEqual("My Title", CaseConverter.ToProperCase("mY tItLe"));
 }
コード例 #3
0
 public void TestToProperCaseWithRomanNumeralsInsideOfWord()
 {
     Assert.AreEqual("The Liver Is An Organ", CaseConverter.ToProperCase("the liver is an organ", CasingOptions.CapitalizeRomanNumerals));
 }
コード例 #4
0
 public void TestToProperCaseWithRomanNumerals()
 {
     Assert.AreEqual("James III Of Scotland", CaseConverter.ToProperCase("james iii of scotland", CasingOptions.CapitalizeRomanNumerals));
 }
コード例 #5
0
 public void TestToProperCaseWithUpperCaseAndPreserveAcronymsOption()
 {
     Assert.AreEqual("MY TITLE", CaseConverter.ToProperCase("MY TITLE", CasingOptions.PreserveAcronyms));
 }
コード例 #6
0
 public void TestToProperCaseWithUpperCase()
 {
     Assert.AreEqual("My Title", CaseConverter.ToProperCase("MY TITLE"));
 }
コード例 #7
0
 public static string ToProper(this string input, CasingOptions options = CasingOptions.Default)
 {
     return(CaseConverter.ToProperCase(input, options));
 }