public async Task ThenOnlyOwnersCanSearchAndAddNewLegalEntities(Role userRole, HttpStatusCode expectedResponse) { //Arrange _mediator.Setup(x => x.SendAsync(It.IsAny <GetUserAccountRoleQuery>())).ReturnsAsync(new GetUserAccountRoleResponse { UserRole = userRole }); //Act var actual = await _orchestrator.GetAddLegalEntityViewModel("5454654", "ADSD123"); //Assert Assert.AreEqual(expectedResponse, actual.Status); }
public async Task <ActionResult> AddOrganisation(string hashedAccountId) { var response = await _orchestrator.GetAddLegalEntityViewModel(hashedAccountId, OwinWrapper.GetClaimValue(@"sub")); return(View(response)); }