Skip to content

Commit b1cf60e

Browse files
authored
separating out from PR22713 (Azure#22756)
1 parent f5868fa commit b1cf60e

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/ContainerRepositoryLiveTests.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,9 @@ public async Task CanGetManifestsWithCustomPageSize(bool anonymous)
169169
AsyncPageable<ArtifactManifestProperties> artifacts = repository.GetManifestPropertiesCollectionAsync();
170170
var pages = artifacts.AsPages(pageSizeHint: pageSize);
171171

172-
int pageCount = 0;
173-
await foreach (var page in pages)
174-
{
175-
Assert.GreaterOrEqual(page.Values.Count, pageSize);
176-
pageCount++;
177-
}
178-
179172
// Assert
180-
Assert.IsTrue(pageCount >= minExpectedPages);
173+
int pageCount = await pages.CountAsync();
174+
Assert.GreaterOrEqual(pageCount, minExpectedPages);
181175
}
182176

183177
[RecordedTest]

sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/RegistryArtifactLiveTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public async Task CanGetManifestListProperties()
3232
// Assert
3333
Assert.Contains(tag, properties.Tags.ToList());
3434
Assert.AreEqual(_repositoryName, properties.RepositoryName);
35-
Assert.GreaterOrEqual(helloWorldRelatedArtifacts, properties.RelatedArtifacts.Count);
35+
Assert.GreaterOrEqual(properties.RelatedArtifacts.Count, helloWorldRelatedArtifacts);
3636

3737
Assert.IsTrue(properties.RelatedArtifacts.Any(
3838
artifact =>

0 commit comments

Comments
 (0)