public IHttpActionResult GetAvailableRooms(int buildingId, [FromBody] DateModel dateModel, int roomId) { var rooms = _bll.GetAvailableRooms(buildingId, dateModel.beginDate, dateModel.endDate, roomId); if (rooms == null) { return(BadRequest()); } return(Ok(rooms)); }
public void TestAvailableRooms1() { var result = bll.GetAvailableRooms(1, new DateTime(2018, 11, 20, 15, 0, 0), new DateTime(2018, 11, 20, 16, 0, 0), 0); Assert.AreEqual(0, result.Count()); }