Fix typo in test class (#84961)

This commit is contained in:
Ahmed Ashour 2021-07-01 22:46:03 +02:00 committed by GitHub
parent 529a599ce6
commit 76db0d7428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,9 +195,9 @@ void main() {
}); });
testWithoutContext('should not be up to date, if some cached artifact is not', () async { testWithoutContext('should not be up to date, if some cached artifact is not', () async {
final CachedArtifact artifact1 = FakeSecondayCachedArtifact() final CachedArtifact artifact1 = FakeSecondaryCachedArtifact()
..upToDate = true; ..upToDate = true;
final CachedArtifact artifact2 = FakeSecondayCachedArtifact() final CachedArtifact artifact2 = FakeSecondaryCachedArtifact()
..upToDate = false; ..upToDate = false;
final FileSystem fileSystem = MemoryFileSystem.test(); final FileSystem fileSystem = MemoryFileSystem.test();
@ -211,9 +211,9 @@ void main() {
}); });
testWithoutContext('should be up to date, if all cached artifacts are', () async { testWithoutContext('should be up to date, if all cached artifacts are', () async {
final FakeSecondayCachedArtifact artifact1 = FakeSecondayCachedArtifact() final FakeSecondaryCachedArtifact artifact1 = FakeSecondaryCachedArtifact()
..upToDate = true; ..upToDate = true;
final FakeSecondayCachedArtifact artifact2 = FakeSecondayCachedArtifact() final FakeSecondaryCachedArtifact artifact2 = FakeSecondaryCachedArtifact()
..upToDate = true; ..upToDate = true;
final FileSystem fileSystem = MemoryFileSystem.test(); final FileSystem fileSystem = MemoryFileSystem.test();
final Cache cache = Cache.test( final Cache cache = Cache.test(
@ -226,9 +226,9 @@ void main() {
}); });
testWithoutContext('should update cached artifacts which are not up to date', () async { testWithoutContext('should update cached artifacts which are not up to date', () async {
final FakeSecondayCachedArtifact artifact1 = FakeSecondayCachedArtifact() final FakeSecondaryCachedArtifact artifact1 = FakeSecondaryCachedArtifact()
..upToDate = true; ..upToDate = true;
final FakeSecondayCachedArtifact artifact2 = FakeSecondayCachedArtifact() final FakeSecondaryCachedArtifact artifact2 = FakeSecondaryCachedArtifact()
..upToDate = false; ..upToDate = false;
final FileSystem fileSystem = MemoryFileSystem.test(); final FileSystem fileSystem = MemoryFileSystem.test();
@ -272,9 +272,9 @@ void main() {
testWithoutContext('failed storage.googleapis.com download shows China warning', () async { testWithoutContext('failed storage.googleapis.com download shows China warning', () async {
final InternetAddress address = (await InternetAddress.lookup('storage.googleapis.com')).first; final InternetAddress address = (await InternetAddress.lookup('storage.googleapis.com')).first;
final FakeSecondayCachedArtifact artifact1 = FakeSecondayCachedArtifact() final FakeSecondaryCachedArtifact artifact1 = FakeSecondaryCachedArtifact()
..upToDate = false; ..upToDate = false;
final FakeSecondayCachedArtifact artifact2 = FakeSecondayCachedArtifact() final FakeSecondaryCachedArtifact artifact2 = FakeSecondaryCachedArtifact()
..upToDate = false ..upToDate = false
..updateException = SocketException( ..updateException = SocketException(
'Connection reset by peer', 'Connection reset by peer',
@ -969,7 +969,7 @@ class FakeDownloadedArtifact extends CachedArtifact {
Future<void> updateInner(ArtifactUpdater artifactUpdater, FileSystem fileSystem, OperatingSystemUtils operatingSystemUtils) async { } Future<void> updateInner(ArtifactUpdater artifactUpdater, FileSystem fileSystem, OperatingSystemUtils operatingSystemUtils) async { }
} }
class FakeSecondayCachedArtifact extends Fake implements CachedArtifact { class FakeSecondaryCachedArtifact extends Fake implements CachedArtifact {
bool upToDate = false; bool upToDate = false;
bool didUpdate = false; bool didUpdate = false;
Exception updateException; Exception updateException;