Beispiel #1
0
        public void TestGetValue()
        {
            // Arrange
            var columnInfo = new CountryColumnInfo {
                IsNullable = false
            };
            var strategy = new CountryColumnValueStrategy(RepoFactory);
            // Act
            string value = strategy.GetValue(columnInfo);

            // Assert
            Assert.AreEqual(CountryName, value);
        }
Beispiel #2
0
        public void TestGetValue_WithMaxLengthRestriction()
        {
            // Arrange
            const int maxLength = 2;
            // Arrange
            var columnInfo = new CountryColumnInfo {
                IsNullable = false, MaxLength = maxLength
            };
            var strategy = new CountryColumnValueStrategy(RepoFactory);
            // Act
            string value = strategy.GetValue(columnInfo);

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