Re-introducing Switcher::getLastExecutionResult feature #349
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



This pull request simplifies the
SwitcherAPI by removing thebuild()method and introducing a new method,getLastExecutionResult(), to retrieve the last execution result. It updates the documentation, tests, and related code to reflect these changes.API Changes:
build()method from theSwitcherinterface, simplifying the API by directly chaining methods without requiring an explicit build step. (src/main/java/com/github/switcherapi/client/model/Switcher.java, [1];src/main/java/com/github/switcherapi/client/model/SwitcherRequest.java, [2]getLastExecutionResult()method to theSwitcherinterface to retrieve the last execution result, enhancing usability. (src/main/java/com/github/switcherapi/client/model/Switcher.java, [1];src/main/java/com/github/switcherapi/client/model/SwitcherRequest.java, [2]Documentation Updates:
README.mdto reflect the removal of thebuild()method and added instructions for usinggetLastExecutionResult(). (README.md, [1] [2]Test Updates:
build()method and added assertions to validate the behavior ofgetLastExecutionResult(). (src/test/java/com/github/switcherapi/client/SwitcherBypassTest.java, [1] [2] [3] [4] [5] [6];src/test/java/com/github/switcherapi/client/SwitcherLocal1Test.java, [7];src/test/java/com/github/switcherapi/client/SwitcherThrottleTest.java, [8];src/test/java/com/github/switcherapi/playground/ClientPlayground.java, [9]Code Cleanup:
build()method. (src/test/java/com/github/switcherapi/client/SwitcherLocal1Test.java, src/test/java/com/github/switcherapi/client/SwitcherLocal1Test.javaL7-R10)