Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
REST MODULE: PED Central is the home for the open-source �Justify� suite of software engineering modules. Justify seeks API alignment between Java 1.8+ application code and JUnit 5 test code.
/*
* [Licensed per the Open Source "MIT License".]
*
* Copyright (c) 2006 - 2018 by
* Global Technology Consulting Group, Inc. at
* http://gtcGroup.com
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.gtcgroup.justify.rest.testing.assertion;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Invocation;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Response;
import org.glassfish.jersey.client.ClientConfig;
import org.opentest4j.AssertionFailedError;
import com.gtcgroup.justify.rest.helper.internal.LogRestUtilHelper;
import com.sun.research.ws.wadl.HTTPMethods;
/**
* This Assertions class provides convenience methods for assertion processing.
*
*
* Copyright (c) 2006 - 2018 by Global Technology Consulting Group, Inc. at
* gtcGroup.com .
*
*
* @author Marvin Toll
* @since v3.0
*/
public enum AssertionsREST {
INSTANCE;
/**
* This method supports status code processing for {@link Exception}s. A
* {@link Boolean} value is returned if a {@link WebApplicationException} is
* thrown indicating a valid status code was returned as defined in the
* {@link JstAssertRestPO}.
*
* @return {@link List} or null if the I/O Controller returns no response.
*/
public static List> assertList(final JstAssertRestPO assertRestPO) {
try {
return buildResponseList(assertRestPO);
} catch (final Exception e) {
throwAssertFailedWithMessage(HTTPMethods.GET.toString(), assertRestPO, null, e.getMessage()); // Tested
}
return null;
}
/**
* This method supports status code processing for {@link Exception}s. A
* {@link Boolean} value is returned if a {@link WebApplicationException} is
* thrown indicating a valid status code was returned as defined in the
* {@link JstAssertRestPO}.
*
* @return {@link Object} or null.
*/
@SuppressWarnings("resource")
public static