예제 #1
0
        public void Given_Valid_Arguments_When_I_Call_GetDayBatch_Then_The_Correct_Service_Method_Is_Called()
        {
            //act
            _sut.GetDayBatch(_instrumentName, _serverParkName);

            //assert
            _catiServiceMock.Verify(v => v.GetDayBatch(_connectionModel, _instrumentName,
                                                       _serverParkName), Times.Once);
        }
예제 #2
0
        public DayBatchDto GetDayBatch(string instrumentName, string serverParkName)
        {
            instrumentName.ThrowExceptionIfNullOrEmpty("instrumentName");
            serverParkName.ThrowExceptionIfNullOrEmpty("serverParkName");

            var dayBatchModel = _blaiseCatiApi.GetDayBatch(instrumentName, serverParkName);

            if (dayBatchModel == null)
            {
                throw new DataNotFoundException("No daybatch found");
            }

            return(_mapper.MapToDayBatchDto(dayBatchModel));
        }