Esempio n. 1
0
        public List <DateTime> GetSurveyDays(string instrumentName, string serverParkName)
        {
            instrumentName.ThrowExceptionIfNullOrEmpty("instrumentName");
            serverParkName.ThrowExceptionIfNullOrEmpty("serverParkName");

            var surveyDays = _blaiseCatiApi.GetSurveyDays(instrumentName, serverParkName);

            return(surveyDays);
        }
Esempio n. 2
0
        public void Given_Valid_Arguments_When_I_Call_GetSurveyDays_Then_The_Expected_Result_Is_Returned()
        {
            var surveyDays = new List <DateTime>
            {
                new DateTime(2020, 12, 10),
                new DateTime(2020, 12, 11)
            };

            //arrange
            _catiServiceMock.Setup(p => p.GetSurveyDays(_connectionModel, _instrumentName, _serverParkName)).Returns(surveyDays);

            //act
            var result = _sut.GetSurveyDays(_instrumentName, _serverParkName);

            //assert
            Assert.IsNotNull(result);
            Assert.IsInstanceOf <List <DateTime> >(result);
            Assert.AreEqual(surveyDays, result);
        }
Esempio n. 3
0
        private CatiInstrumentDto GetCatiInstrumentDto(ISurvey instrument)
        {
            var surveyDays = _blaiseApi.GetSurveyDays(instrument.Name, instrument.ServerPark);

            return(_mapper.MapToCatiInstrumentDto(instrument, surveyDays));
        }