public void TestGetValue() { // Arrange var columnInfo = new AddressLine1ColumnInfo { IsNullable = false }; var strategy = new AddressLine1ColumnValueStrategy(RepoFactory); // Act string value = strategy.GetValue(columnInfo); // Assert Assert.IsFalse(string.IsNullOrWhiteSpace(value), "Address line is empty"); }
public void TestGetValue_WithMaxLengthRestriction() { // Arrange const int maxLength = 16; // Arrange var columnInfo = new AddressLine1ColumnInfo { IsNullable = false, MaxLength = maxLength }; var strategy = new AddressLine1ColumnValueStrategy(RepoFactory); // Act string value = strategy.GetValue(columnInfo); // Assert Assert.IsFalse(string.IsNullOrWhiteSpace(value), "Address line is empty"); Assert.IsTrue(4 < value.Length && value.Length <= maxLength); }