public void Regular_I_Returned_With_Turkish_Culture_And_CapitalizeFirstCharacterInvariantCulture_Option() { string input = "invariantCulture"; string expected = "Invariant Culture"; Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("tr"); string result = RegexUtility.FormatCamelCase(input, camelCaseOptions: CamelCaseOptions.CapitalizeFirstCharacterInvariantCulture); result.ShouldBe(expected); }
public void Can_Format_CamelCase_And_Capitalize_First_Character(string input, string expected) { string result = RegexUtility.FormatCamelCase(input, camelCaseOptions: CamelCaseOptions.CapitalizeFirstCharacter); result.ShouldBe(expected); }
public void Can_Format_CamelCase_Inputs_With_Numbers(string input, string expected) { string result = RegexUtility.FormatCamelCase(input); result.ShouldBe(expected); }
public void CamelCase_Format_Throws_Exception_For_Null_Or_Empty_Delimiter(string delimiter) { var ex = Should.Throw <ArgumentException>(() => RegexUtility.FormatCamelCase("PascalCase", delimiter)); ex.ParamName.ShouldBe("delimiter"); }
public void Can_Format_CamelCase_With_Given_Delimiter(string input, string expected, string delimiter) { string result = RegexUtility.FormatCamelCase(input, delimiter); result.ShouldBe(expected); }
public void Can_Format_CamelCase_With_Spaces_By_Default(string input, string expected) { string result = RegexUtility.FormatCamelCase(input); result.ShouldBe(expected); }
public void CamelCase_Format_Of_Single_Word_Returns_Original_Word_Unmodified(string input) { string result = RegexUtility.FormatCamelCase(input); result.ShouldBe(input); }