Example #1
0
        public void FromDto_ReturnsProperObject()
        {
            //Arrange
            AnalysisInfoDto dto = new AnalysisInfoDto()
            {
                StartDate  = DEFAULT_START_DATETIME,
                EndDate    = DEFAULT_END_DATETIME,
                StartIndex = DEFAULT_START_INDEX,
                EndIndex   = DEFAULT_END_INDEX,
                MinLevel   = DEFAULT_MIN_LEVEL,
                MaxLevel   = DEFAULT_MAX_LEVEL,
                Counter    = DEFAULT_COUNTER
            };

            //Act
            AnalysisInfo actualAnalysisInfo = AnalysisInfo.FromDto(dto);

            //Assert
            AnalysisInfo expectedAnalysisInfo = new AnalysisInfo()
            {
                StartDate  = DEFAULT_START_DATETIME,
                EndDate    = DEFAULT_END_DATETIME,
                StartIndex = DEFAULT_START_INDEX,
                EndIndex   = DEFAULT_END_INDEX,
                MinLevel   = DEFAULT_MIN_LEVEL,
                MaxLevel   = DEFAULT_MAX_LEVEL,
                Counter    = DEFAULT_COUNTER
            };

            Assert.AreEqual(expectedAnalysisInfo, actualAnalysisInfo);
        }
Example #2
0
        public AnalysisInfo GetAnalysisInfo(int assetId, int timeframeId)
        {
            _repository = new EFQuotationRepository();
            AnalysisInfoDto dto = _repository.GetAnalysisInfo(assetId, timeframeId);

            return(AnalysisInfo.FromDto(dto));
        }