Esempio n. 1
0
 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));
 }
Esempio n. 2
0
        public EmployerAccountsApiClientTestsFixture SetReadStorePingFailure()
        {
            MockApiMediator.Setup(m => m.Send(It.IsAny <PingQuery>(), CancellationToken)).Throws <Exception>();

            return(this);
        }
Esempio n. 3
0
        public EmployerAccountsApiClientTestsFixture SetReadStorePingSuccess()
        {
            MockApiMediator.Setup(m => m.Send(It.IsAny <PingQuery>(), CancellationToken)).ReturnsAsync(Unit.Value);

            return(this);
        }