public ActionResult <IEnumerable <MotionModel> > Get([FromQuery] int?date, [FromQuery] int?month, [FromQuery] int?year, [FromQuery] int?sensorId) { List <MotionModel> allPirs = _manager.GetAll(date, month, year, sensorId); if (allPirs.Count == 0) { return(NotFound("Nothing found")); } return(Ok(allPirs)); }
public void ManagerMotionGetAllTest() { List <MotionModel> motionList = _manager.GetAll(); int sizeOfList = motionList.Count(); Assert.AreEqual(sizeOfList, motionList.Count); //// Test for DeleteAll //_manager.DeleteAll(Secrets.ourKey); //PirList = _manager.GetAll(); //Assert.AreEqual(0, PirList.Count); }