File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
sdk/containerregistry/Azure.Containers.ContainerRegistry/tests Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff 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 ]
Original file line number Diff line number Diff 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 =>
You can’t perform that action at this time.
0 commit comments