public void Floor_GetAllFloors_Should_Return_Floors() { _floorController.Request = new HttpRequestMessage(); _floorController.Request.SetConfiguration(new HttpConfiguration()); var response = _floorController.GetAllFloors(1); var mockOffice = _unitOfWork.GetDbContextAs <MockDbContext>().Offices.Find(o => o.Id == 1); Assert.AreEqual(response.PagedList.TotalItemCount, mockOffice.Floors.Count); }