Exemple #1
0
        public void TestGetValue()
        {
            // Arrange
            var columnInfo = new FirstNameColumnInfo {
                IsNullable = false
            };
            var strategy = new FirstNameColumnValueStrategy(RepoFactory);
            // Act
            string value = strategy.GetValue(columnInfo, EmptyCountry);

            // Assert
            Assert.AreEqual(firstName, value);
        }
Exemple #2
0
        public void TestGetValue_WithMaxLengthRestriction()
        {
            // Arrange
            const int maxLength = 2;
            // Arrange
            var columnInfo = new FirstNameColumnInfo {
                IsNullable = false, MaxLength = maxLength
            };
            var strategy = new FirstNameColumnValueStrategy(RepoFactory);
            // Act
            string value = strategy.GetValue(columnInfo, EmptyCountry);

            // Assert
            Assert.AreEqual(firstName.Substring(0, maxLength), value);
        }