public IHttpActionResult HasDayBatchForToday([FromUri] string serverParkName, [FromUri] string instrumentName) { _loggingService.LogInfo($"Check a daybatch exists today for instrument '{instrumentName}' on server park '{serverParkName}'"); var exists = _catiService.InstrumentHasADayBatchForToday(instrumentName, serverParkName); _loggingService.LogInfo($"Daybatch exists today for instrument'{instrumentName}' - '{exists}'"); return(Ok(exists)); }
public void Given_A_DayBatch_Exists_Today_When_I_Call_InstrumentHasADayBatchForToday_Then_True_Is_Returned() { //arrange const string instrumentName = "OPN2101A"; const string serverParkName = "ServerParkA"; var dayBatchModel = new DayBatchModel { DayBatchDate = DateTime.Today }; _blaiseCatiApiMock.Setup(b => b.GetDayBatch(instrumentName, serverParkName)).Returns(dayBatchModel); //act var result = _sut.InstrumentHasADayBatchForToday(instrumentName, serverParkName); //assert Assert.IsNotNull(result); Assert.IsTrue(result); }