Esempio n. 1
0
        protected async Task <HttpResponseMessage> LoginAsync(string userNameOrEmail, string password)
        {
            var adminUserLoginViewModel = new LoginInput
            {
                UserNameOrEmail = userNameOrEmail,
                Password        = password
            };

            return(await TestServer.CreateClient().PostAsync("/api/login",
                                                             adminUserLoginViewModel.ToStringContent(Encoding.UTF8, "application/json")));
        }
Esempio n. 2
0
 protected async Task <HttpResponseMessage> LoginAsAdminUserAsync()
 {
     return(await TestServer.CreateClient().PostAsync("/api/login",
                                                      AdminUserLoginViewModel.ToStringContent(Encoding.UTF8, "application/json")));
 }