Beispiel #1
0
        public IHttpActionResult GetRoomsForBuilding(int buildingId)
        {
            var rooms = _bll.GetRoomsForBuilding(buildingId);

            if (rooms == null)
            {
                return(BadRequest());
            }
            return(Ok(rooms));
        }
Beispiel #2
0
        public void TestGetRoomsForBuilding()
        {
            var result = bll.GetRoomsForBuilding(1);

            Assert.AreEqual(1, result.FirstOrDefault(r => r.Code.Equals("123")).RoomID);
        }