public async Task <OperationResult <community> > GetByIdAsync(int id) { community community = await communityRepo.GetByIdAsync(id); if (community != null) { return(new OperationResult <community>() { Success = true, Message = Messages.COMMUNITY_SUCCESS, Result = community }); } return(new OperationResult <community>() { Success = false, Message = Messages.COMMUNITY_NOT_EXIST }); }
public void GetCommunity() { community res = com.GetByIdAsync(1).Result; Assert.AreEqual("cenas", res.name); }