Ejemplo n.º 1
0
 public ApiMediator(IIwsClient client, HttpContextBase httpContext,
                    IOAuthClientCredentialClient oauthClientCredentialClient)
 {
     this.client      = client;
     this.httpContext = httpContext;
     this.oauthClientCredentialClient = oauthClientCredentialClient;
 }
Ejemplo n.º 2
0
 public AccountControllerTests()
 {
     apiClient = A.Fake <IWeeeClient>();
     oauthClientCredentialClient = A.Fake <IOAuthClientCredentialClient>();
     unauthenticatedUserClient   = A.Fake <IUnauthenticatedUser>();
     weeeAuthorization           = A.Fake <IWeeeAuthorization>();
     externalRouteService        = A.Fake <IExternalRouteService>();
 }
Ejemplo n.º 3
0
        public ApiErrorLog(IDictionary config)
        {
            this.apiClient = DependencyResolver.Current.GetService <IIwsClient>();
            this.oauthClientCredentialClient = DependencyResolver.Current.GetService <IOAuthClientCredentialClient>();
            this.httpContext = HttpContext.Current;

            ApplicationName = (string)(config["applicationName"] ?? string.Empty);
        }
Ejemplo n.º 4
0
 public NewUserControllerTests()
 {
     oathClient            = A.Fake <IOAuthClient>();
     weeeClient            = A.Fake <IWeeeClient>();
     oathClientCredential  = A.Fake <IOAuthClientCredentialClient>();
     authenticationManager = A.Fake <IAuthenticationManager>();
     externalRouteService  = A.Fake <IExternalRouteService>();
     appConfig             = A.Fake <IAppConfiguration>();
 }
Ejemplo n.º 5
0
 public AccountController(IOAuthClient oauthClient,
                          IAuthenticationManager authenticationManager,
                          IIwsClient client,
                          IUserInfoClient userInfoClient,
                          IOAuthClientCredentialClient oauthClientCredentialClient)
 {
     this.oauthClient                 = oauthClient;
     this.client                      = client;
     this.authenticationManager       = authenticationManager;
     this.userInfoClient              = userInfoClient;
     this.oauthClientCredentialClient = oauthClientCredentialClient;
 }
Ejemplo n.º 6
0
        public AccountControllerTests()
        {
            client = A.Fake <IIwsClient>();
            oauthClientCredentialClient = A.Fake <IOAuthClientCredentialClient>();

            controller = new AccountController(A.Fake <IOAuthClient>(), A.Fake <IAuthenticationManager>(), client,
                                               A.Fake <IUserInfoClient>(), oauthClientCredentialClient);

            var request = A.Fake <HttpRequestBase>();
            var context = A.Fake <HttpContextBase>();

            A.CallTo(() => request.Url).Returns(new Uri("https://test.com"));
            A.CallTo(() => context.Request).Returns(request);

            controller.ControllerContext = new ControllerContext(context, new RouteData(), controller);

            controller.Url = new UrlHelper(new RequestContext(context, new RouteData()));
        }