public void ShouldGiveSingleQuoteWhenLookedUpById() { var record = _manager.Find(15).GetAwaiter().GetResult(); Assert.NotNull(record); Assert.Equal(15, record.Id); Assert.NotEmpty(record.Text); Assert.NotEmpty(record.Author); Assert.Equal("Life is 10% what happens to me and 90% of how I react to it.", record.Text); Assert.Equal("Charles Swindoll", record.Author); Assert.NotEqual(DateTime.MinValue, record.CreatedAt); Assert.Null(record.UpdatedAt); Assert.Null(record.DeletedAt); Assert.False(record.IsDeleted); }
public async Task <ActionResult <QuoteOutputDto> > Get(int id) { var record = await _manager.Find(id); return(Ok(_mapper.Map <QuoteOutputDto>(record))); }