示例#1
0
        public void GetValidationResultsForSampleDtoWithValidNameReturnsEmptyList()
        {
            // Arrange
            var sampleDto = new SampleDto()
            {
                Name = SAMPLE_DTO_NAME
            };

            // Act
            var validationResults = sampleDto.GetValidationResults();

            // Arrange
            Assert.AreEqual(0, validationResults.Count);
        }
示例#2
0
        public void GetValidationResultsForSampleDtoWithInvalidNameReturnsListOfResults()
        {
            // Arrange
            var sampleDto = new SampleDto()
            {
                Name = " "
            };

            // Act
            var validationResults = sampleDto.GetValidationResults();

            // Arrange
            Assert.AreEqual(1, validationResults.Count);
        }