diff --git a/Data/Sources/Data/Usecases/SearchPhotos/Models/FlickrSearchPhotoError.swift b/Data/Sources/Data/Usecases/SearchPhotos/Models/FlickrSearchPhotoError.swift index 09f3354..6a7acf7 100644 --- a/Data/Sources/Data/Usecases/SearchPhotos/Models/FlickrSearchPhotoError.swift +++ b/Data/Sources/Data/Usecases/SearchPhotos/Models/FlickrSearchPhotoError.swift @@ -14,6 +14,12 @@ enum FlickrSearchPhotoError: Error, Equatable { case parameterlessSearchesDisabled case noPermission case userDeleted + case aNewCaseWhichWillBeTested1 + case aNewCaseWhichWillBeTested2 + case aNewCaseWhichWillBeTested3 + case aNewCaseWhichWillBeTested4 + case aNewCaseWhichWillBeTested5 + case aNewCaseWhichWillBeTested6 init(rawValue: Int) { switch rawValue { @@ -27,6 +33,18 @@ enum FlickrSearchPhotoError: Error, Equatable { self = .noPermission case 5: self = .userDeleted + case 6: + self = .aNewCaseWhichWillBeTested1 + case 7: + self = .aNewCaseWhichWillBeTested2 + case 8: + self = .aNewCaseWhichWillBeTested3 + case 9: + self = .aNewCaseWhichWillBeTested4 + case 10: + self = .aNewCaseWhichWillBeTested5 + case 11: + self = .aNewCaseWhichWillBeTested6 // not tested default: self = .api(FlickrAPIError(rawValue: rawValue) ?? .unknown) } diff --git a/Data/Tests/DataTests/Usecases/SearchPhotos/FlickrSearchPhotoErrorTests.swift b/Data/Tests/DataTests/Usecases/SearchPhotos/FlickrSearchPhotoErrorTests.swift index 81e12fb..25a5565 100644 --- a/Data/Tests/DataTests/Usecases/SearchPhotos/FlickrSearchPhotoErrorTests.swift +++ b/Data/Tests/DataTests/Usecases/SearchPhotos/FlickrSearchPhotoErrorTests.swift @@ -25,13 +25,18 @@ final class FlickrSearchPhotoErrorTests: XCTestCase { func test_Init_onSupportedInputs_shouldReturnEnum() throws { // given - let inputs = [1, 2, 3, 4, 5] + let inputs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] let expectedResults: [FlickrSearchPhotoError] = [ .tooManyTags, .unknownUser, .parameterlessSearchesDisabled, .noPermission, - .userDeleted + .userDeleted, + .aNewCaseWhichWillBeTested1, + .aNewCaseWhichWillBeTested2, + .aNewCaseWhichWillBeTested3, + .aNewCaseWhichWillBeTested4, + .aNewCaseWhichWillBeTested5 ] for (index, input) in inputs.enumerated() {