private async Task <HttpResponseMessage> AddScheme(string name, string message) { var goToSignIn = await Client.GetAsync("/"); var signIn = await TestAssert.IsHtmlDocumentAsync(goToSignIn); var form = TestAssert.HasForm(signIn); return(await Client.SendAsync(form, new Dictionary <string, string>() { ["scheme"] = name, ["OptionsMessage"] = message, })); }
internal static async Task <HttpResponseMessage> SignIn(HttpClient client, string userName, string dob) { var goToSignIn = await client.GetAsync("/account/signin"); var signIn = await TestAssert.IsHtmlDocumentAsync(goToSignIn); var form = TestAssert.HasForm(signIn); return(await client.SendAsync(form, new Dictionary <string, string>() { ["UserName"] = userName, ["DOB"] = dob, })); }
internal async Task SignIn(string userName) { var goToSignIn = await Client.GetAsync("/account/login"); var signIn = await TestAssert.IsHtmlDocumentAsync(goToSignIn); var form = TestAssert.HasForm(signIn); await Client.SendAsync(form, new Dictionary <string, string>() { ["username"] = userName, ["password"] = userName // this test doesn't care what the password is }); Assert.Equal(HttpStatusCode.OK, signIn.StatusCode); }