-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more refactoring challenges out to statics on classes
- Loading branch information
1 parent
fbd3d42
commit ab6bcae
Showing
5 changed files
with
185 additions
and
85 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
21 changes: 21 additions & 0 deletions
21
.../src/main/java/uk/co/compendiumdev/challenge/challenges/definitions/DeleteChallenges.java
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,21 @@ | ||
package uk.co.compendiumdev.challenge.challenges.definitions; | ||
|
||
import uk.co.compendiumdev.challenge.challenges.ChallengeDefinitionData; | ||
|
||
public class DeleteChallenges { | ||
|
||
public static ChallengeDefinitionData deleteTodosId200(int challengeOrder) { | ||
ChallengeDefinitionData aChallenge = new ChallengeDefinitionData( | ||
ChallengeRenderer.renderChallengeNumber(challengeOrder), | ||
"DELETE /todos/{id} (200)", | ||
"Issue a DELETE request to successfully delete a todo"); | ||
|
||
aChallenge.addHint("Make sure you don't use {id} in the url, replace that with the id of a todo e.g. /todos/1"); | ||
aChallenge.addHint("Make sure a todo with the id exists prior to issuing the request"); | ||
aChallenge.addHint("Check it was deleted by issuing a GET or HEAD on the /todos/{id}"); | ||
aChallenge.addSolutionLink("Read Solution", "HREF", "https://www.eviltester.com/apichallenges/howto/delete-todos-id-200"); | ||
aChallenge.addSolutionLink("Watch Insomnia Solution", "YOUTUBE", "6MXTkaXn9qU"); | ||
|
||
return aChallenge; | ||
} | ||
} |
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
18 changes: 18 additions & 0 deletions
18
...src/main/java/uk/co/compendiumdev/challenge/challenges/definitions/OptionsChallenges.java
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,18 @@ | ||
package uk.co.compendiumdev.challenge.challenges.definitions; | ||
|
||
import uk.co.compendiumdev.challenge.challenges.ChallengeDefinitionData; | ||
|
||
public class OptionsChallenges { | ||
|
||
public static ChallengeDefinitionData optionsTodos200(int challengeOrder) { | ||
ChallengeDefinitionData aChallenge = new ChallengeDefinitionData( | ||
ChallengeRenderer.renderChallengeNumber(challengeOrder), | ||
"OPTIONS /todos (200)", | ||
"Issue an OPTIONS request on the `/todos` end point. You might want to manually check the 'Allow' header in the response is as expected."); | ||
|
||
aChallenge.addSolutionLink("Read Solution", "HREF","https://www.eviltester.com/apichallenges/howto/options-todos-200/"); | ||
aChallenge.addSolutionLink("Watch Insomnia Solution", "YOUTUBE", "Ld5h1TSnXWA"); | ||
|
||
return aChallenge; | ||
} | ||
} |
Oops, something went wrong.