public AccountControllerTests() { apiClient = A.Fake<IWeeeClient>(); unauthenticatedUserClient = A.Fake<IUnauthenticatedUser>(); weeeAuthorization = A.Fake<IWeeeAuthorization>(); externalRouteService = A.Fake<IExternalRouteService>(); }
public AccountControllerTests() { apiClient = A.Fake <IWeeeClient>(); oauthClientCredentialClient = A.Fake <IOAuthClientCredentialClient>(); unauthenticatedUserClient = A.Fake <IUnauthenticatedUser>(); weeeAuthorization = A.Fake <IWeeeAuthorization>(); externalRouteService = A.Fake <IExternalRouteService>(); }
public AccountControllerTest() { apiClient = A.Fake <IWeeeClient>(); authenticationManager = A.Fake <IAuthenticationManager>(); oauthClient = A.Fake <IOAuthClient>(); userInfoClient = A.Fake <IUserInfoClient>(); externalRouteService = A.Fake <IExternalRouteService>(); }
public AccountController(Func<IWeeeClient> apiClient, IWeeeAuthorization weeeAuthorization, IExternalRouteService externalRouteService) { this.apiClient = apiClient; this.weeeAuthorization = weeeAuthorization; this.externalRouteService = externalRouteService; }
public AccountControllerTest() { apiClient = A.Fake<IWeeeClient>(); authenticationManager = A.Fake<IAuthenticationManager>(); oauthClient = A.Fake<IOAuthClient>(); userInfoClient = A.Fake<IUserInfoClient>(); externalRouteService = A.Fake<IExternalRouteService>(); }
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>(); }
public AccountController(Func <IWeeeClient> apiClient, IWeeeAuthorization weeeAuthorization, IExternalRouteService externalRouteService, Func <IOAuthClientCredentialClient> apiClientCredential) { this.apiClient = apiClient; this.weeeAuthorization = weeeAuthorization; this.externalRouteService = externalRouteService; this.apiClientCredential = apiClientCredential; }
public AccountController( Func<IWeeeClient> apiClient, IAuthenticationManager authenticationManager, IExternalRouteService externalRouteService, IWeeeAuthorization weeeAuthorization) { this.apiClient = apiClient; this.authenticationManager = authenticationManager; this.externalRouteService = externalRouteService; this.weeeAuthorization = weeeAuthorization; }
public NewUserController(Func <IOAuthClient> oauthClient, Func <IWeeeClient> apiClient, IAuthenticationManager authenticationManager, IExternalRouteService externalRouteService, IAppConfiguration appConfig, Func <IOAuthClientCredentialClient> oauthClientCredential) { this.oauthClient = oauthClient; this.apiClient = apiClient; this.authenticationManager = authenticationManager; this.externalRouteService = externalRouteService; this.appConfig = appConfig; this.oauthClientCredential = oauthClientCredential; }
public async Task ActivateUserAccount_WithInvalidToken_ReturnsAccountActivationFailedView() { // Arrange IWeeeClient apiClient = A.Fake <IWeeeClient>(); A.CallTo(() => apiClient.User.ActivateUserAccountEmailAsync(A <ActivatedUserAccountData> ._, A <string> ._)) .Returns(false); IWeeeAuthorization weeeAuthorization = A.Dummy <IWeeeAuthorization>(); IExternalRouteService externalRouteService = A.Dummy <IExternalRouteService>(); var controller = new AccountController(() => apiClient, weeeAuthorization, externalRouteService, () => oauthClientCredentialClient); // Act var result = await controller.ActivateUserAccount(new Guid("EF565DF2-DC16-4589-9CE4-B29568B3E274"), "code"); // Assert ViewResult viewResult = result as ViewResult; Assert.NotNull(viewResult); Assert.Equal("AccountActivationFailed", viewResult.ViewName); }