public void VerifyMediatorCallForIsUserInAny() { MockApiMediator.Verify(m => m.Send(It.Is <IsUserInRoleQuery>(q => q.UserRef == IsUserInRoleRequest.UserRef && q.AccountId == IsUserInRoleRequest.AccountId && q.UserRoles.Count == IsUserInRoleRequest.Roles.Count && q.UserRoles.All(role => IsUserInRoleRequest.Roles.Any(requestRole => requestRole == role)) ), CancellationToken)); }
public EmployerAccountsApiClientTestsFixture SetReadStorePingFailure() { MockApiMediator.Setup(m => m.Send(It.IsAny <PingQuery>(), CancellationToken)).Throws <Exception>(); return(this); }
public EmployerAccountsApiClientTestsFixture SetReadStorePingSuccess() { MockApiMediator.Setup(m => m.Send(It.IsAny <PingQuery>(), CancellationToken)).ReturnsAsync(Unit.Value); return(this); }