public async Task GetRoomByIdAsync_WhenIdIsValid()
        {
            //arrange
            const int id = 1;

            //act
            var result = await _mazeRepository.GetRoomByIdAsync(id);

            //assert
            Assert.IsNotNull(result.Room);
        }
Esempio n. 2
0
 public async Task <RoomResponse> GetRoomByIdAsync(int roomId)
 {
     try
     {
         return(await _mazeRepository.GetRoomByIdAsync(roomId));
     }
     catch (Exception ex)
     {
         return(new RoomResponse($"Some Error occurred while saving the maze: {ex.Message}"));
     }
 }