public void Get_WhenGetElementByKnownId_ThenReturnedNotNullObject() { // Arrange // Act var returnedCount = service.Get(testItem.Id); // Assert Assert.IsNotNull(returnedCount); }
public IActionResult Get(Guid id) { AeroplaneTypeDto aeroplaneTypeDto; try { aeroplaneTypeDto = aeroplaneTypeService.Get(id); } catch (Exception ex) { return(BadRequest(new { ErrorType = ex.GetType().Name, ex.Message })); } return(Ok(aeroplaneTypeDto)); }