public void Apply_WithThreeWordPropertyNameWithTitleCase_ReturnsCamlecaseAndHyphenSeparated() { string propertyName = "ThreeWordsNow"; string expectedResult = "three-Words-Now"; var namingConvention = new CamelDashNameConvention(); var result = namingConvention.Apply(propertyName); Assert.Equal(expected: expectedResult, actual: result); }
public void Apply_WithOneWordPropertyNameInAllLowerCase_ReturnsAllLowerCasePropertyName() { string propertyName = "lower"; string expectedResult = "lower"; var namingConvention = new CamelDashNameConvention(); var result = namingConvention.Apply(propertyName); Assert.Equal(expected: expectedResult, actual: result); }
public void Apply_WithOneWordPropertyNameWithAllLettersCapitalised_ReturnsAllLowerCasePropertyName() { string propertyName = "SKU"; string expectedResult = "sku"; var namingConvention = new CamelDashNameConvention(); var result = namingConvention.Apply(propertyName); Assert.Equal(expected: expectedResult, actual: result); }
public void ApplyingNaming_WithEmptyPropertyNameProvided_ThrowsException() { string propertyName = string.Empty; var namingConvention = new CamelDashNameConvention(); Assert.Throws <ArgumentException>(() => { namingConvention.Apply(propertyName); }); }