-
-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ascanrules: add SqlInjectionScanRule unit tests for boolean based #5797
base: main
Are you sure you want to change the base?
Conversation
addOns/ascanrules/src/main/java/org/zaproxy/zap/extension/ascanrules/SqlInjectionScanRule.java
Outdated
Show resolved
Hide resolved
...anrules/src/test/java/org/zaproxy/zap/extension/ascanrules/SqlInjectionScanRuleUnitTest.java
Outdated
Show resolved
Hide resolved
8fcb9d6
to
ff7eae4
Compare
Signed-off-by: FiveOFive <FiveOFive@users.noreply.github.com>
ff7eae4
to
366804e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I believe this makes the tests more clear and maintainable. The coverage seems roughly the same.
class BooleanBasedSqlInjection { | ||
|
||
@Test | ||
void shouldAlert_ANDTrueMatches_ANDFalseDoesNotMatch() throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that you're trying to make the naming/conditions more clear however I think we'd like to stick with the Java naming convention(s).
So maybe: shouldAlertWhenCheckAndTrueMatchesCCheckAndFalseDoesNotMatch
Similar for those below.
Overview
Briefly describe the purpose, goals, and changes or improvements made in this pull request.
Related Issues
Specify any related issues or pull requests by linking to them. zaproxy/zaproxy#8652
Checklist
./gradlew spotlessApply
for code formattingFor more details, please refer to the developer rules and guidelines.