public async Task FindByIdAsyncTest_ValidId_HappyPath() { //arrange _repositoryMock.WithSuccesfulFindById(); var member = MemberTestUtils.GenerateValidMember(); //act await _facade.FindByIdAsync(member.Id); //assert _repositoryMock.Verify(x => x.FindById(It.IsAny <string>()), Times.Once); }
[Authorize] // Should this be allowed to access to anyone with any account? If not, specify the role. public async Task <ActionResult> GetUser(string id) { ViewBag.user = await _facade.FindByIdAsync(id); return(View()); }