Skip to content

library to generate junit assertion for any given objects Edit Add topics

License

Notifications You must be signed in to change notification settings

kvlabs/assertion-script-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assertion Script Generator

Utility class to generate junit assertion script for the given object.

Usage.

String assertionScript;
assertionScript = new AssertionScriptGenerator(actual, "actual").generateAssertionScript();
//or
assertionScript = new AssertionScriptGenerator(result).generateAssertionScript();
System.out.println(assertionScript);
Step 1

Generate / Create junit test case.

Step 2

Do the relevant mocking or data creation for the input variable.

Step 3

Use AssertionScriptGenerator to generate assertion script form the actual returned object. step1

Step 4

Run the test script and copy the assertion script printed in the console. step2

Step 5

Replace the AssertionScriptGenerator generation with the generated code. step3

License

By contributing your code, you agree to license your contribution under the MIT License.

About

library to generate junit assertion for any given objects Edit Add topics

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages