public static void ColumnToPropertyName_GivenNullOrWhiteSpaceColumnName_ThrowsArgumentNullException(string columnName) { const string className = "test"; var nameTranslator = new PascalCaseNameTranslator(); Assert.That(() => nameTranslator.ColumnToPropertyName(className, columnName), Throws.ArgumentNullException); }
public static void ColumnToPropertyName_GivenTransformedNameMatchingClassName_ReturnsUnderscoreAppendedColumnName() { var nameTranslator = new PascalCaseNameTranslator(); const string className = "FirstSecond"; const string testName = "FirstSecond"; const string expected = "FirstSecond_"; var result = nameTranslator.ColumnToPropertyName(className, testName); Assert.That(result, Is.EqualTo(expected)); }
public static void ColumnToPropertyName_GivenCamelCasedSchemaName_ReturnsPascalCasedText() { var nameTranslator = new PascalCaseNameTranslator(); const string className = "test"; const string testName = "FirstSecond"; const string expected = "FirstSecond"; var result = nameTranslator.ColumnToPropertyName(className, testName); Assert.That(result, Is.EqualTo(expected)); }