Skip to content

Commit

Permalink
Merge pull request #629 from authorjapps/sonatype_release_20240218
Browse files Browse the repository at this point in the history
PR - gpg plugin version updated
  • Loading branch information
authorjapps authored Feb 18, 2024
2 parents 65892d1 + d9e6890 commit 1122880
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 71 deletions.
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>zerocode-tdd-parent</artifactId>
<groupId>org.jsmart</groupId>
<version>1.3.36-SNAPSHOT</version>
<version>1.3.38-SNAPSHOT</version>
</parent>

<artifactId>zerocode-tdd</artifactId>
Expand Down Expand Up @@ -257,7 +257,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@
import static org.jsmart.zerocode.core.utils.TokenUtils.populateParamMap;
import static org.slf4j.LoggerFactory.getLogger;

;
;

public class ZeroCodeAssertionsProcessorImpl implements ZeroCodeAssertionsProcessor {

private static final org.slf4j.Logger LOGGER = getLogger(ZeroCodeAssertionsProcessorImpl.class);
Expand Down Expand Up @@ -385,8 +382,7 @@ public List<FieldAssertionMatcher> assertAllAndReturnFailed(List<JsonAsserter> a
* First the logic checks if dig-deep needed to avoid unwanted recursions. If not needed, the step definition is
* returned intact. Otherwise calls the dig deep method to perform the operation.
*
* @param thisStep
* @return The effective step definition
* returns: The effective step definition
*/
@Override
public Step resolveJsonContent(Step thisStep, ScenarioExecutionState scenarioExecutionState) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,29 @@
import static org.slf4j.LoggerFactory.getLogger;

/**
* <h3>Parameterized Tests Steps</h3>
* <p>
* Parameterized Tests Steps
*
* Processes the Step for each line in the parameterized/parameterizedCsv section.
* <p>
* <p>
*
* Parameters can be
* "parameterized": [
* 200,
* "Hello",
* true
* ]
* <p>
*
* -or-
* <p>
*
* "parameterizedCsv": [
* "1, 2, 200",
* "11, 22, 400",
* "21, 31, 500"
* ]
* <p>
*
* In each the above cases, the step will execute 3 times.
* <p>
*
* For "parameterized" case, ${0} will resolve to 200, "Hello", true respectively for each run.
* <p>
*
* For "parameterizedCsv" case, ${0}, ${1}, ${2} will resolve to "1", "2", "200" for the first run.
* Then it will resolve to "11", "22", "400" for the 2nd run ans so on.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public BasicHttpClient(CloseableHttpClient httpclient) {
* - org.jsmart.zerocode.core.httpclient.ssl.CorporateProxyNoSslContextHttpClient#createHttpClient()
* }
*
* @return CloseableHttpClient
* return CloseableHttpClient
* @throws Exception
*/
public CloseableHttpClient createHttpClient() throws Exception {
Expand Down Expand Up @@ -100,14 +100,13 @@ public CloseableHttpClient createHttpClient() throws Exception {
* Override this method in case you want to execute the http call differently via your http client.
* Otherwise the framework falls back to this implementation by default.
*
* @param httpUrl : path to end point
* @param methodName : e.g. GET, PUT etc
* @param headers : headers, cookies etc
* @param queryParams : key-value query params after the ? in the url
* @param body : json body
* httpUrl : path to end point
* methodName : e.g. GET, PUT etc
* headers : headers, cookies etc
* queryParams : key-value query params after the ? in the url
* body : json body
*
* @return : Http response consists of status code, entity, headers, cookies etc
* @throws Exception
* returns : Http response consists of status code, entity, headers, cookies etc
*/
public Response execute(String httpUrl,
String methodName,
Expand Down Expand Up @@ -151,9 +150,9 @@ public Response execute(String httpUrl,
* Once the client executes the http call, then it receives the http response. This method takes care of handling
* that. In case you need to handle it differently you can override this method.
*
* @param httpResponse : Received Apache http response from the server
* httpResponse : Received Apache http response from the server
*
* @return : Effective response with handled http session.
* : Effective response with handled http session.
* @throws IOException
*/
public Response handleResponse(CloseableHttpResponse httpResponse) throws IOException {
Expand All @@ -178,12 +177,11 @@ public Response handleResponse(CloseableHttpResponse httpResponse) throws IOExce
* use the Charset sent by the server e.g. UAT-8 or UTF-16 or UTF-32 etc.
*
* Note-
* See implementation of java.nio.charset.Charset#defaultCharset. Here the default is UTF-8 if the
* See the implementation of java.nio.charset.Charset#defaultCharset. Here the default is UTF-8 if the
* defaultCharset is not set by the JVM, otherwise it picks the JVM provided defaultCharset
*
* @param httpResponse
* @return : A http response compatible with Charset received from the http server e.g. UTF-8, UTF-16 etc
* @throws IOException
* httpResponse:
* A http response compatible with Charset received from the http server e.g. UTF-8, UTF-16 etc
*
*/
public Response createCharsetResponse(CloseableHttpResponse httpResponse) throws IOException {
Expand Down Expand Up @@ -214,9 +212,9 @@ public Response createCharsetResponse(CloseableHttpResponse httpResponse) throws
* In case you need to handle it differently you can override this method to change this behaviour to roll your own
* feature.
*
* @param httpUrl - Url of the target service
* @param queryParams - Query parameters to pass
* @return : Effective url
* httpUrl - Url of the target service
* queryParams - Query parameters to pass
* return : Effective url
*
*/
public String handleUrlAndQueryParams(String httpUrl, Map<String, Object> queryParams) throws URISyntaxException {
Expand All @@ -231,9 +229,9 @@ public String handleUrlAndQueryParams(String httpUrl, Map<String, Object> queryP
* If you want to override any headers, you can do that by overriding the
* amendRequestHeaders(headers) method.
*
* @param headers
* @param requestBuilder
* @return : An effective Apache http request builder object with processed headers.
* headers
* requestBuilder
* return : An effective Apache http request builder object with processed headers.
*/
public RequestBuilder handleHeaders(Map<String, Object> headers, RequestBuilder requestBuilder) {
Map<String, Object> amendedHeaders = amendRequestHeaders(headers);
Expand All @@ -246,8 +244,8 @@ public RequestBuilder handleHeaders(Map<String, Object> headers, RequestBuilder
* - Add more headers to the http request or
* - Amend or modify the headers which were supplied from the JSON test-case request step.
*
* @param headers : The headers passed from the JSON test step request
* @return : An effective headers map.
* headers : The headers passed from the JSON test step request
* return : An effective headers map.
*/
public Map<String, Object> amendRequestHeaders(Map<String, Object> headers) {
return headers;
Expand All @@ -257,8 +255,8 @@ public Map<String, Object> amendRequestHeaders(Map<String, Object> headers) {
* Override this method when you want to manipulate the request body passed from your test cases.
* Otherwise the framework falls back to this default implementation.
* You can override this method via @UseHttpClient(YourCustomHttpClient.class)
* @param body
* @return
* body
* return
*/
public String handleRequestBody(Object body) {
return getContentAsItIsJson(body);
Expand All @@ -273,10 +271,10 @@ public String handleRequestBody(Object body) {
*
* You can override this method via @UseHttpClient(YourCustomHttpClient.class)
*
* @param httpUrl
* @param methodName
* @param reqBodyAsString
* @return
* httpUrl
* methodName
* reqBodyAsString
* return
*/
public RequestBuilder createDefaultRequestBuilder(String httpUrl, String methodName, String reqBodyAsString) {
RequestBuilder requestBuilder = RequestBuilder
Expand All @@ -298,11 +296,6 @@ public RequestBuilder createDefaultRequestBuilder(String httpUrl, String methodN
* is passed in the request. In case you want to build or prepare the requests differently,
* you can override this method via @UseHttpClient(YourCustomHttpClient.class).
*
* @param httpUrl
* @param methodName
* @param reqBodyAsString
* @return
* @throws IOException
*/
public RequestBuilder createFormUrlEncodedRequestBuilder(String httpUrl, String methodName, String reqBodyAsString) throws IOException {
RequestBuilder requestBuilder = RequestBuilder
Expand Down Expand Up @@ -333,11 +326,9 @@ public RequestBuilder createFormUrlEncodedRequestBuilder(String httpUrl, String
*
* You can override this method via @UseHttpClient(YourCustomHttpClient.class)
*
* @param httpUrl
* @param methodName
* @param reqBodyAsString
* @return
* @throws IOException
* httpUrl: The end pint
* methodName: meaningful name of a method
* reqBodyAsString:
*/
public RequestBuilder createFileUploadRequestBuilder(String httpUrl, String methodName, String reqBodyAsString) throws IOException {
Map<String, Object> fileFieldNameValueMap = getFileFieldNameValue(reqBodyAsString);
Expand Down Expand Up @@ -367,8 +358,8 @@ public RequestBuilder createFileUploadRequestBuilder(String httpUrl, String meth
* In case the session is not needed or to be handled differently, then this
* method can be overridden to do nothing or to roll your own feature.
*
* @param serverResponse
* @param headerKey
* serverResponse
* headerKey
*/
public void handleHttpSession(Response serverResponse, String headerKey) {
/** ---------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ protected List<ScenarioSpec> getChildren() {
* Returns a {@link Description} for {@code child}, which can be assumed to
* be an element of the list returned by {@link ParentRunner#getChildren()}
*
* @param child
*/
@Override
protected Description describeChild(ScenarioSpec child) {
Expand Down Expand Up @@ -163,8 +162,6 @@ protected RunListener createTestUtilityListener() {
* Subclasses are responsible for making sure that relevant test events are
* reported through {@code notifier}
*
* @param child
* @param notifier
*/
@Override
protected void runChild(ScenarioSpec child, RunNotifier notifier) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public class ZeroCodeUnitRunner extends BlockJUnit4ClassRunner {
/**
* Creates a BlockJUnit4ClassRunner to run {@code klass}
*
* @param klass
* @throws InitializationError if the test class is malformed.
* klass:
* InitializationError if the test class is malformed.
*/
public ZeroCodeUnitRunner(Class<?> klass) throws InitializationError {
super(klass);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,9 @@ public static String getEnvPropertyValue(String envPropertyKey) {
}

/**
*
* @param thisStep --> Currently executing step
* @param tokenString --> JSON_PAYLAOD_FILE or JSON_CONTENT
* @return if there is a match for the token, then the json traversal will happen
* @throws JsonProcessingException
* thisStep : Currently executing step
* tokenString : JSON_PAYLAOD_FILE or JSON_CONTENT
* if there is a match for the token, then the json traversal will happen
*/
public static boolean checkDigNeeded(ObjectMapper mapper, Step thisStep, String tokenString) throws JsonProcessingException {
String stepJson = mapper.writeValueAsString(thisStep);
Expand Down
2 changes: 1 addition & 1 deletion http-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>zerocode-tdd-parent</artifactId>
<groupId>org.jsmart</groupId>
<version>1.3.36-SNAPSHOT</version>
<version>1.3.38-SNAPSHOT</version>
</parent>

<groupId>org.jsmart</groupId>
Expand Down
2 changes: 1 addition & 1 deletion junit5-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>zerocode-tdd-parent</artifactId>
<groupId>org.jsmart</groupId>
<version>1.3.36-SNAPSHOT</version>
<version>1.3.38-SNAPSHOT</version>
</parent>

<artifactId>zerocode-tdd-jupiter</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion kafka-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>zerocode-tdd-parent</artifactId>
<groupId>org.jsmart</groupId>
<version>1.3.36-SNAPSHOT</version>
<version>1.3.38-SNAPSHOT</version>
</parent>

<artifactId>kafka-testing</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<artifactId>zerocode-tdd-parent</artifactId>
<groupId>org.jsmart</groupId>
<version>1.3.36-SNAPSHOT</version>
<version>1.3.38-SNAPSHOT</version>

<packaging>pom</packaging>
<name>ZeroCode TDD Parent</name>
Expand Down
2 changes: 1 addition & 1 deletion zerocode-maven-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jsmart</groupId>
<artifactId>zerocode-tdd-parent</artifactId>
<version>1.3.36-SNAPSHOT</version>
<version>1.3.38-SNAPSHOT</version>
</parent>
<artifactId>zerocode-maven-archetype</artifactId>

Expand Down

0 comments on commit 1122880

Please sign in to comment.