public void ParseIndicatorSampleParameterNull_Test() { // Arrange IndicatorSampleDTO indicatorSampleDTO = null; // Act IndicatorSample indicatorSample = factory.Parse(indicatorSampleDTO); }
public IndicatorSampleDTO Create(IndicatorSample indicatorSample) { return(new IndicatorSampleDTO() { Id = indicatorSample.Id, Name = indicatorSample.Name, CriteriaSampleId = indicatorSample.CriteriaSampleId, Order = indicatorSample.Order }); }
public void ParseIndicatorSampleIdNotZero_Test() { // Arrange IndicatorSampleDTO indicatorSampleDTO = new IndicatorSampleDTO { Id = 2, Name = "Name", Order = 1 }; // Act IndicatorSample indicatorSample = factory.Parse(indicatorSampleDTO); // Assert Assert.True(indicatorSample != null && indicatorSample.Id == indicatorSampleDTO.Id && indicatorSample.Name == indicatorSampleDTO.Name && indicatorSample.Order == indicatorSampleDTO.Order); }
private IndicatorSample ParseForAdd(IndicatorSampleDTO indicatorSampleDTO) { if (indicatorSampleDTO != null) { var indicatorSample = new IndicatorSample() { Id = indicatorSampleDTO.Id, Name = indicatorSampleDTO.Name, Order = indicatorSampleDTO.Order, CriteriaSampleId = indicatorSampleDTO.CriteriaSampleId }; return(indicatorSample); } else { throw new NotSupportedException(String.Format("BAD GATEWAY!!! {0} ADD operation temporary NOT SUPPORTED for IndicatorSample table...", Environment.NewLine)); } }