public async Task Setup() { var reader = AccountBuilder.InLibrary(LibraryId).As(Role.Reader).Build(); _chapter = ChapterBuilder.WithLibrary(LibraryId).WithContents().WithoutAnyAssignment().Build(); _response = await Client.PostObject($"/libraries/{LibraryId}/books/{_chapter.BookId}/chapters/{_chapter.ChapterNumber}/assign", new { AccountId = reader.Id, Type = "write" }); }
public async Task Setup() { _library = LibraryBuilder.Build(); _account = AccountBuilder.InLibrary(_library.Id).AsInvitation().Build(); _response = await Client.PostObject($"/accounts/invitations", new ResendInvitationCodeRequest() { Email = _account.Email }); }
public async Task Setup() { _library = LibraryBuilder.Build(); _account = AccountBuilder.InLibrary(_library.Id).AsInvitation().Build(); _response = await Client.PostObject($"/accounts/register/{_account.InvitationCode}", new RegisterRequest { Name = _name, Password = _password, AcceptTerms = true }); }
public async Task Setup() { var name = RandomData.String; var password = RandomData.String; _library = LibraryBuilder.Build(); _account = AccountBuilder.InLibrary(_library.Id).AsInvitation().Build(); _response = await Client.PostObject($"/accounts/register/{Guid.NewGuid().ToString("N")}", new RegisterRequest { Name = name, Password = password, AcceptTerms = true }); }
public async Task Setup() { var name = RandomData.String; var password = RandomData.String; _library = LibraryBuilder.Build(); _account = AccountBuilder.InLibrary(_library.Id) .AsInvitation().ExpiringInvitation(DateTime.UtcNow.AddDays(-1)).Build(); _response = await Client.PostObject($"/accounts/register/{_account.InvitationCode}", new RegisterRequest { Name = name, Password = password, AcceptTerms = true }); }