public async Task <IHttpActionResult> GetAsync(Guid id) { ModelStateIdValidation(id); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (!await _retrievalService.Exists(id)) { return(NotFound()); } var foundNote = await _retrievalService.GetByIdAsync(id); return(Ok(foundNote)); }
public async Task ExistsAsync_ExistingNote_TrueReturned() { var isExisting = await _retrievalService.Exists(Note.Id); Assert.That(isExisting, Is.True); }