Skip to content

Commit

Permalink
Add another test for GetAllCorpora.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnml1135 committed Jan 9, 2025
1 parent e1b218b commit 2dee7b9
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,18 @@ public async Task PropagateFileDeletedToCorpus()
Assert.That(updatedCorpus2.Files.Count, Is.EqualTo(1));
}

[Test]
public async Task AddCorpusGetAllCorpora()
{
var scope = new[] { Scopes.CreateFiles, Scopes.ReadFiles };
var corporaClient = _env.CreateCorporaClient(scope);
var newCorpus = new CorpusConfig { Language = "es", Files = new List<CorpusFileConfig>() };
var created = await corporaClient.CreateAsync(newCorpus);
Assert.That(created, Is.Not.Null);
var allCorpora = await corporaClient.GetAllAsync();
Assert.That(allCorpora.Count, Is.EqualTo(3));
}

[TearDown]
public void TearDown()
{
Expand Down

0 comments on commit 2dee7b9

Please sign in to comment.