Example #1
0
    public async Task <ConfirmEmail> ClickConfirmLinkAsync()
    {
        var goToConfirm = await Client.GetAsync(_confirmLink.Href);

        var confirm = await ResponseAssert.IsHtmlDocumentAsync(goToConfirm);

        return(await ConfirmEmail.Create(_confirmLink, Client, Context));
    }
Example #2
0
    internal static async Task <ConfirmEmail> ConfirmEmailAsync(IdentityEmail email, HttpClient client)
    {
        var emailBody   = HtmlAssert.IsHtmlFragment(email.Body);
        var linkElement = HtmlAssert.HasElement("a", emailBody);
        var link        = Assert.IsAssignableFrom <IHtmlAnchorElement>(linkElement);

        return(await ConfirmEmail.Create(link, client, new DefaultUIContext()
                                         .WithAuthenticatedUser()
                                         .WithExistingUser()
                                         .WithConfirmedEmail()));
    }