Update test case to make it more solid
This commit is contained in:
parent
91b8caf6d2
commit
99c59ac52b
|
@ -63,7 +63,7 @@
|
|||
if (image && data && !error && finished) {
|
||||
[expectation fulfill];
|
||||
} else {
|
||||
XCTFail(@"Something went wrong");
|
||||
XCTFail(@"Something went wrong: %@", error.description);
|
||||
}
|
||||
}];
|
||||
[self waitForExpectationsWithCommonTimeout];
|
||||
|
@ -130,7 +130,7 @@
|
|||
if (image && data && !error && finished) {
|
||||
[expectation fulfill];
|
||||
} else {
|
||||
XCTFail(@"Something went wrong");
|
||||
XCTFail(@"Something went wrong: %@", error.description);
|
||||
}
|
||||
}];
|
||||
[self waitForExpectationsWithCommonTimeoutUsingHandler:^(NSError * _Nullable error) {
|
||||
|
@ -145,7 +145,7 @@
|
|||
if (image && data && !error && finished) {
|
||||
[expectation fulfill];
|
||||
} else if (finished) {
|
||||
XCTFail(@"Something went wrong");
|
||||
XCTFail(@"Something went wrong: %@", error.description);
|
||||
} else {
|
||||
// progressive updates
|
||||
}
|
||||
|
@ -161,7 +161,7 @@
|
|||
if (!image && !data && error && finished) {
|
||||
[expectation fulfill];
|
||||
} else {
|
||||
XCTFail(@"Something went wrong");
|
||||
XCTFail(@"Something went wrong: %@", error.description);
|
||||
}
|
||||
}];
|
||||
[self waitForExpectationsWithCommonTimeout];
|
||||
|
@ -227,7 +227,7 @@
|
|||
if (image && data && !error && finished) {
|
||||
[expectation fulfill];
|
||||
} else {
|
||||
XCTFail(@"Something went wrong");
|
||||
XCTFail(@"Something went wrong: %@", error.description);
|
||||
}
|
||||
}];
|
||||
|
||||
|
@ -243,7 +243,7 @@
|
|||
if (image && data && !error && finished) {
|
||||
[expectation fulfill];
|
||||
} else {
|
||||
XCTFail(@"Something went wrong");
|
||||
XCTFail(@"Something went wrong: %@", error.description);
|
||||
}
|
||||
}];
|
||||
[self waitForExpectationsWithCommonTimeout];
|
||||
|
@ -256,7 +256,7 @@
|
|||
if (image && data && !error && finished) {
|
||||
[expectation fulfill];
|
||||
} else {
|
||||
XCTFail(@"Something went wrong");
|
||||
XCTFail(@"Something went wrong: %@", error.description);
|
||||
}
|
||||
}];
|
||||
[self waitForExpectationsWithCommonTimeout];
|
||||
|
@ -353,6 +353,8 @@
|
|||
} completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) {
|
||||
if (allProgressCount > 0) {
|
||||
[expectation fulfill];
|
||||
allProgressCount = 0;
|
||||
return;
|
||||
} else {
|
||||
XCTFail(@"Progress callback more than once");
|
||||
}
|
||||
|
@ -370,7 +372,7 @@
|
|||
if (image && data && !error && finished) {
|
||||
[expectation fulfill];
|
||||
} else if (finished) {
|
||||
XCTFail(@"Something went wrong");
|
||||
XCTFail(@"Something went wrong: %@", error.description);
|
||||
} else {
|
||||
// progressive updates
|
||||
}
|
||||
|
@ -385,7 +387,7 @@
|
|||
if (image && data && !error && finished) {
|
||||
[expectation fulfill];
|
||||
} else if (finished) {
|
||||
XCTFail(@"Something went wrong");
|
||||
XCTFail(@"Something went wrong: %@", error.description);
|
||||
} else {
|
||||
// progressive updates
|
||||
}
|
||||
|
@ -422,7 +424,7 @@
|
|||
if (image && data && !error && finished) {
|
||||
[expectation fulfill];
|
||||
} else {
|
||||
XCTFail(@"Something went wrong");
|
||||
XCTFail(@"Something went wrong: %@", error.description);
|
||||
}
|
||||
}];
|
||||
expect(token2).toNot.beNil();
|
||||
|
@ -464,7 +466,7 @@
|
|||
[expectation fulfill];
|
||||
} else {
|
||||
NSLog(@"image = %@, data = %@, error = %@", image, data, error);
|
||||
XCTFail(@"Something went wrong");
|
||||
XCTFail(@"Something went wrong: %@", error.description);
|
||||
}
|
||||
}];
|
||||
expect(token2).toNot.beNil();
|
||||
|
|
Loading…
Reference in New Issue