public void GetTrendRangeById_ReturnsNull_IfThereIsNoTrendlineWithSuchId()
        {
            //Arrange
            EFTrendlineRepository repository = new EFTrendlineRepository();

            TrendRangeDto[] ranges = getDefaultTrendRangeDtosArray();
            clearTrendRangesTables();
            repository.UpdateTrendRanges(ranges);

            //Act
            TrendRangeDto resultDto = repository.GetTrendRangeById(50);

            //Assert
            Assert.IsNull(resultDto);
        }
        public void GetTrendRangeById_ReturnsProperTrendlineDto_IfExists()
        {
            //Arrange
            EFTrendlineRepository repository  = new EFTrendlineRepository();
            List <TrendRangeDto>  trendBreaks = new List <TrendRangeDto>();
            TrendRangeDto         expectedDto = getDefaultTrendRangeDto();

            trendBreaks.AddRange(new TrendRangeDto[] { expectedDto });
            clearTrendRangesTables();
            repository.UpdateTrendRanges(trendBreaks);

            //Act
            TrendRangeDto resultDto = repository.GetTrendRangeById(expectedDto.Id);

            //Assert
            var areEqual = expectedDto.Equals(resultDto);

            Assert.IsTrue(areEqual);
        }