org.odpi.openmetadata.accessservices.assetowner.fvt.AssetOwnerOMASFVTSuite Maven / Gradle / Ivy
/* SPDX-License-Identifier: Apache 2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.accessservices.assetowner.fvt;
import org.odpi.openmetadata.accessservices.assetowner.fvt.assets.CreateAssetTest;
import org.odpi.openmetadata.accessservices.assetowner.fvt.clientconstructors.ClientConstructorTest;
import org.odpi.openmetadata.accessservices.assetowner.fvt.errorhandling.InvalidParameterTest;
import org.odpi.openmetadata.fvt.utilities.FVTResults;
import org.odpi.openmetadata.fvt.utilities.FVTSuiteBase;
/**
* AssetOwnerOMASFVT provides the main program for the Asset Owner OMAS
* Functional Verification Tests (FVTs).
*/
public class AssetOwnerOMASFVTSuite extends FVTSuiteBase
{
/**
* Run all of the defined tests and capture the results.
*
* @param serverName name of the server to connect to
* @param serverPlatformRootURL the network address of the server running the OMAS REST servers
* @param userId calling user
* @return combined results of running test
*/
protected int performFVT(String serverName,
String serverPlatformRootURL,
String userId)
{
int returnCode = 0;
FVTResults results;
results = ClientConstructorTest.performFVT(serverName, serverPlatformRootURL);
if (! results.isSuccessful())
{
returnCode --;
}
results.printResults();
results = InvalidParameterTest.performFVT(serverName, serverPlatformRootURL, userId);
if (! results.isSuccessful())
{
returnCode --;
}
results.printResults();
results = CreateAssetTest.performFVT(serverName, serverPlatformRootURL, userId);
if (! results.isSuccessful())
{
returnCode --;
}
results.printResults();
return returnCode;
}
}