Skip to content
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

Code changes required for testgenerator plugin #396

Draft
wants to merge 31 commits into
base: develop
Choose a base branch
from

Conversation

rakshitkr
Copy link
Contributor

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Eclipse Version:
  • Java Version:
  • OS:

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>

- all extracted methods are used by de.cognicrypt.testgenerator plugin
- also changed some private methods to public for usage in testgenerator
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>

- without this condition crysl.handler throws exception when testgenerator is triggered
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>

- fixes null in second primitive parameter of method call
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>

- without this fix type is null for second primitive parameter of method call
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>

- this generates test cases with getInstance method calls
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>

-  used to generate test inputs that are passed as method parameters in generated test cases
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>

- such as InputStream instead of java.io.InputStream
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>

- required by addAdditionalFiles method of TestGenerator
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>

- used in overridden addStatementToBody method of GeneratorTestMethod class
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>
- this file isn't used anywhere in the code

Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>

- SSL rules have non primitive array objects like String[], javax.net.ssl.KeyManager[] and so on that weren't handled before
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>

- Used to generate constraints like protocols, ciphersuites in SSLParameters that are string arrays
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>

- these are used by sub classes in test generator plugin
rakshitkr and others added 4 commits August 19, 2020 12:46
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>

- required for SSLParameters crysl rule
Signed-off-by: Rakshit Krishnappa Ravi <rakshitkrishnapparavi@gmail.com>

- required by its subclass in testgenerator plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants