-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Husseinhj/main
Supported include and exclude queries
- Loading branch information
Showing
13 changed files
with
287 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
[ | ||
{ | ||
"id": "1016", | ||
"author": "Andrew Ridley", | ||
"width": 3844, | ||
"height": 2563, | ||
"url": "https://unsplash.com/photos/_h7aBovKia4", | ||
"download_url": "https://picsum.photos/id/1018/3914/2935" | ||
}, | ||
{ | ||
"id": "1018", | ||
"author": "Andrew Ridley", | ||
"width": 3914, | ||
"height": 2935, | ||
"url": "https://unsplash.com/photos/Kt5hRENuotI", | ||
"download_url": "https://picsum.photos/id/1018/3914/2935" | ||
}, | ||
{ | ||
"id": "1019", | ||
"author": "Patrick Fore", | ||
"width": 5472, | ||
"height": 3648, | ||
"url": "https://unsplash.com/photos/V6s1cmE39XM", | ||
"download_url": "https://picsum.photos/id/1019/5472/3648" | ||
}, | ||
{ | ||
"id": "102", | ||
"author": "Ben Moore", | ||
"width": 4320, | ||
"height": 3240, | ||
"url": "https://unsplash.com/photos/pJILiyPdrXI", | ||
"download_url": "https://picsum.photos/id/102/4320/3240" | ||
}, | ||
{ | ||
"id": "1020", | ||
"author": "Adam Willoughby-Knox", | ||
"width": 4288, | ||
"height": 2848, | ||
"url": "https://unsplash.com/photos/_snqARKTgoc", | ||
"download_url": "https://picsum.photos/id/1020/4288/2848" | ||
}, | ||
{ | ||
"id": "1022", | ||
"author": "Vashishtha Jogi", | ||
"width": 6000, | ||
"height": 3376, | ||
"url": "https://unsplash.com/photos/bClr95glx6k", | ||
"download_url": "https://picsum.photos/id/1022/6000/3376" | ||
}, | ||
{ | ||
"id": "1023", | ||
"author": "William Hook", | ||
"width": 3955, | ||
"height": 2094, | ||
"url": "https://unsplash.com/photos/93Ep1dhTd2s", | ||
"download_url": "https://picsum.photos/id/1023/3955/2094" | ||
}, | ||
{ | ||
"id": "1024", | ||
"author": "Мартин Тасев", | ||
"width": 1920, | ||
"height": 1280, | ||
"url": "https://unsplash.com/photos/7ALI0RYyq6s", | ||
"download_url": "https://picsum.photos/id/1024/1920/1280" | ||
}, | ||
{ | ||
"id": "1025", | ||
"author": "Matthew Wiebe", | ||
"width": 4951, | ||
"height": 3301, | ||
"url": "https://unsplash.com/photos/U5rMrSI7Pn4", | ||
"download_url": "https://picsum.photos/id/1025/4951/3301" | ||
}, | ||
{ | ||
"id": "1018", | ||
"author": "Andrew Ridley", | ||
"width": 3914, | ||
"height": 2935, | ||
"url": "https://unsplash.com/photos/Kt5hRENuotI", | ||
"download_url": "https://picsum.photos/id/1018/3914/2935" | ||
}, | ||
{ | ||
"id": "1019", | ||
"author": "Patrick Fore", | ||
"width": 5472, | ||
"height": 3648, | ||
"url": "https://unsplash.com/photos/V6s1cmE39XM", | ||
"download_url": "https://picsum.photos/id/1019/5472/3648" | ||
}, | ||
{ | ||
"id": "102", | ||
"author": "Ben Moore", | ||
"width": 4320, | ||
"height": 3240, | ||
"url": "https://unsplash.com/photos/pJILiyPdrXI", | ||
"download_url": "https://picsum.photos/id/102/4320/3240" | ||
}, | ||
{ | ||
"id": "1020", | ||
"author": "Adam Willoughby-Knox", | ||
"width": 4288, | ||
"height": 2848, | ||
"url": "https://unsplash.com/photos/_snqARKTgoc", | ||
"download_url": "https://picsum.photos/id/1020/4288/2848" | ||
}, | ||
{ | ||
"id": "1021", | ||
"author": "Frances Gunn", | ||
"width": 2048, | ||
"height": 1206, | ||
"url": "https://unsplash.com/photos/8BmNurlVR6M", | ||
"download_url": "https://picsum.photos/id/1021/2048/1206" | ||
}, | ||
{ | ||
"id": "1022", | ||
"author": "Vashishtha Jogi", | ||
"width": 6000, | ||
"height": 3376, | ||
"url": "https://unsplash.com/photos/bClr95glx6k", | ||
"download_url": "https://picsum.photos/id/1022/6000/3376" | ||
}, | ||
{ | ||
"id": "1023", | ||
"author": "William Hook", | ||
"width": 3955, | ||
"height": 2094, | ||
"url": "https://unsplash.com/photos/93Ep1dhTd2s", | ||
"download_url": "https://picsum.photos/id/1023/3955/2094" | ||
}, | ||
{ | ||
"id": "1024", | ||
"author": "Мартин Тасев", | ||
"width": 1920, | ||
"height": 1280, | ||
"url": "https://unsplash.com/photos/7ALI0RYyq6s", | ||
"download_url": "https://picsum.photos/id/1024/1920/1280" | ||
}, | ||
{ | ||
"id": "1025", | ||
"author": "Matthew Wiebe", | ||
"width": 4951, | ||
"height": 3301, | ||
"url": "https://unsplash.com/photos/U5rMrSI7Pn4", | ||
"download_url": "https://picsum.photos/id/1025/4951/3301" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package ir.logicbase.mockfit | ||
|
||
public data class MockPathRule( | ||
val method: String, | ||
val route: String, | ||
val responseFile: String, | ||
val includeQueries: Array<String> = arrayOf(), | ||
val excludeQueries: Array<String> = arrayOf(), | ||
) { | ||
override fun equals(other: Any?): Boolean { | ||
if (this === other) return true | ||
if (javaClass != other?.javaClass) return false | ||
|
||
other as MockPathRule | ||
|
||
if (method != other.method) return false | ||
if (route != other.route) return false | ||
if (responseFile != other.responseFile) return false | ||
if (!includeQueries.contentEquals(other.includeQueries)) return false | ||
if (!excludeQueries.contentEquals(other.excludeQueries)) return false | ||
|
||
return true | ||
} | ||
|
||
override fun hashCode(): Int { | ||
var result = method.hashCode() | ||
result = 31 * result + route.hashCode() | ||
result = 31 * result + responseFile.hashCode() | ||
result = 31 * result + includeQueries.contentHashCode() | ||
result = 31 * result + excludeQueries.contentHashCode() | ||
return result | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.