public async Task Should_load_accounts_list() { var firstInn = LegalEntityInn.Parse("1754462785"); var firstKpp = Kpp.Parse("515744582"); var secondInn = LegalEntityInn.Parse("5616395700"); var secondKpp = Kpp.Parse("515744444"); var orgName = "org"; await using var accountScope1 = await Context.Accounts.CreateAccount(firstInn, firstKpp, orgName).ConfigureAwait(false); await using var accountScope2 = await Context.Accounts.CreateAccount(Inn.Parse("678050110389"), orgName).ConfigureAwait(false); await using var accountScope3 = await Context.Accounts.CreateAccount(secondInn, secondKpp, orgName).ConfigureAwait(false); await Task.Delay(1.Seconds()); var accountsAfterCreate = await Context.Accounts.LoadAllAccountsAsync(); accountsAfterCreate.Count.Should().Be(3); accountsAfterCreate.Should().ContainEquivalentOf(accountScope1.Entity); accountsAfterCreate.Should().ContainEquivalentOf(accountScope2.Entity); accountsAfterCreate.Should().ContainEquivalentOf(accountScope3.Entity); }
public void Should_apply_inn_filter() { var docflowFilter = new DocflowFilterBuilder() .WithInnKppOfALegalEntity(InnKpp.Parse("1234567890-123456789")) .WithIndividualEntrepreneurInn(Inn.Parse("123456789012")) .CreateFilter(); ShouldHaveExpectedQueryParameters(docflowFilter, ("innKpp", "123456789012")); }
public async Task Should_create_a_new_individual_entrepreneur_account_and_read_it() { await using var accountScope = await Context.Accounts.CreateAccount(Inn.Parse("678050110389"), "org"); var account = accountScope.Entity; await Task.Delay(1.Seconds()); var loadedAccount = await Context.Accounts.GetAccount(account.Id); loadedAccount.Should().BeEquivalentTo(account); }