public DeliveryStateControllerTests(ServerFactory serverFactory)
        {
            _client = serverFactory.CreateClient();

            _userToken    = AuthorizationHelpers.GenerateTokenForRole(AuthorizationConstants.Claims.UserClaim);
            _partnerToken = AuthorizationHelpers.GenerateTokenForRole(AuthorizationConstants.Claims.PartnerClaim);
        }
Пример #2
0
        public DeliveryControllerTests(ServerFactory serverFactory)
        {
            _client = serverFactory.CreateClient();

            var token = AuthorizationHelpers.GenerateTokenForRole(AuthorizationConstants.Claims.SystemClaim);

            _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("bearer", token);
        }