public void ParseCriteriaScoreParameterNull_Test() { // Arrange CriteriaScoreDTO criteriaScoreDTO = null; // Act CriteriaScore criteriaScore = factory.Parse(criteriaScoreDTO); }
public CriteriaScoreDTO Create(CriteriaScore criteriaScore) { return(new CriteriaScoreDTO() { Id = criteriaScore.Id, Name = criteriaScore.Name, Weight = criteriaScore.Weight }); }
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)); } }
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); }