Beispiel #1
0
        public void ParseCriteriaScoreParameterNull_Test()
        {
            // Arrange
            CriteriaScoreDTO criteriaScoreDTO = null;

            // Act
            CriteriaScore criteriaScore = factory.Parse(criteriaScoreDTO);
        }
Beispiel #2
0
 public CriteriaScoreDTO Create(CriteriaScore criteriaScore)
 {
     return(new CriteriaScoreDTO()
     {
         Id = criteriaScore.Id,
         Name = criteriaScore.Name,
         Weight = criteriaScore.Weight
     });
 }
Beispiel #3
0
        private CriteriaScore ParseForAdd(CriteriaScoreDTO criteriaScoreDTO)
        {
            if (criteriaScoreDTO != null)
            {
                var criteriaScore = new CriteriaScore()
                {
                    Name   = criteriaScoreDTO.Name,
                    Id     = criteriaScoreDTO.Id,
                    Weight = criteriaScoreDTO.Weight
                };

                return(criteriaScore);
            }
            else
            {
                throw new NotSupportedException(String.Format("BAD GATEWAY!!! {0} ADD operation temporary NOT SUPPORTED for CriteriaScore table", Environment.NewLine));
            }
        }
Beispiel #4
0
        public void ParseCriteriaScoreIdNotZero_Test()
        {
            // Arrange
            CriteriaScoreDTO criteriaScoreDTO = new CriteriaScoreDTO()
            {
                Id     = 2,
                Name   = "Name",
                Weight = 50
            };

            // Act
            CriteriaScore criteriaScore = factory.Parse(criteriaScoreDTO);

            // Assert
            Assert.True(criteriaScore != null &&
                        criteriaScore.Id == criteriaScoreDTO.Id &&
                        criteriaScore.Name == criteriaScoreDTO.Name &&
                        criteriaScore.Weight == criteriaScoreDTO.Weight);
        }