/*
 * Azure Blockchain Workbench REST API
 * The Azure Blockchain Workbench REST API is a Workbench extensibility point, which allows developers to create and manage blockchain applications, manage users and organizations within a consortium, integrate blockchain applications into services and platforms, perform transactions on a blockchain, and retrieve transactional and contract data from a blockchain.
 *
 * OpenAPI spec version: v1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package io.swagger.client.api;

import io.swagger.client.ApiException;
import io.swagger.client.model.Contract;
import io.swagger.client.model.ContractList;
import io.swagger.client.model.LedgerActionOutput;
import io.swagger.client.model.WorkflowActionInput;
import io.swagger.client.model.WorkflowStateTransition;
import io.swagger.client.model.WorkflowStateTransitionList;
import org.junit.Test;
import org.junit.Ignore;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * API tests for ContractsApi
 */
@Ignore
public class ContractsApiTest {

    private final ContractsApi api = new ContractsApi();

    
    /**
     * 
     *
     * Gets the action matching the specified action ID. Users get the action if the user can take the action              given the current state of the specified smart contract instance and the user&#39;s associated application role or smart              contract instance role.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void contractActionGetTest() throws ApiException {
        Integer contractId = null;
        Integer actionId = null;
        WorkflowStateTransition response = api.contractActionGet(contractId, actionId);

        // TODO: test validations
    }
    
    /**
     * 
     *
     * Executes an action for the specified smart contract instance and action ID. Users are only able to execute              the action given the current state of the specified smart contract instance and the user&#39;s associated application role              or smart contract instance role.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void contractActionPostTest() throws ApiException {
        Integer contractId = null;
        WorkflowActionInput actionInformation = null;
        LedgerActionOutput response = api.contractActionPost(contractId, actionInformation);

        // TODO: test validations
    }
    
    /**
     * 
     *
     * Lists all actions, which can be taken by the given user and current state of the specified smart contract              instance. Users get all applicable actions if the user has an associated application role or is associated with a smart              contract instance role for the current state of the specified smart contract instance.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void contractActionsGetTest() throws ApiException {
        Integer contractId = null;
        Integer top = null;
        Integer skip = null;
        WorkflowStateTransitionList response = api.contractActionsGet(contractId, top, skip);

        // TODO: test validations
    }
    
    /**
     * 
     *
     * Creates and deploys a new smart contract instance by adding the instance to the Workbench database and              sending a transaction to the blockchain. This method can only be performed by users who are specified within the              Initiators collection of the workflow within the Workbench application configuration.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void contractGetTest() throws ApiException {
        Integer contractId = null;
        Contract response = api.contractGet(contractId);

        // TODO: test validations
    }
    
    /**
     * 
     *
     * Gets the smart contract instance matching a specific workflow instance ID. Users who are Workbench              administrators get the smart contract instance. Non-Workbench administrators get the smart contract instance              if they have at least one associated application role or is associated with the smart contract instance.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void contractPostTest() throws ApiException {
        WorkflowActionInput workflowActionInput = null;
        Integer workflowId = null;
        Integer contractCodeId = null;
        Integer connectionId = null;
        WorkflowActionInput response = api.contractPost(workflowActionInput, workflowId, contractCodeId, connectionId);

        // TODO: test validations
    }
    
    /**
     * 
     *
     * Lists the smart contract instances of the specified workflow. Users who are Workbench administrators get all              smart contract instances. Non-Workbench administrators get all smart contract instances for which they have at least              one associated application role or is associated with a smart contract instance role.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void contractsGetTest() throws ApiException {
        Integer top = null;
        Integer skip = null;
        Integer workflowId = null;
        ContractList response = api.contractsGet(top, skip, workflowId);

        // TODO: test validations
    }
    
}
