Open full view…

SquareTest for newbies

Wed, 13 Nov 2019 10:21:25 GMT

Hello, I'm discovering SquareTest and I was wondering if we could change the parameters in order to change some generations. I'm particularly thinking of the "final variableType variableName" and the "assertEquals". I would like to change it into "variableType variableName" and "Assert.assertEquals". Anyone knows if this is possible ?

Thu, 09 Jul 2020 14:00:56 GMT

Sorry for the delayed response. You can modify the templates to remove the "final " before each variable declaration. A fairly quick way to do this is: use find/replace on the template text to replace the string: "final " with "". You can modify the #assertEqualsCall(...) macro to use Assert.assertEquals(...) instead of assertEquals(...). You would also need to replace the import statements: "import static org.junit.Assert.assertEquals;" with "import org.junit.Assert;".