/*
 * Cloudera Manager API
 * <h1>Cloudera Manager API v50</h1>       <p>Introduced in Cloudera Manager 7.8.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>
 *
 * OpenAPI spec version: 7.8.1
 * 
 *
 * 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 com.cloudera.api.swagger;

import com.cloudera.api.swagger.client.ApiException;
import com.cloudera.api.swagger.model.ApiCommand;
import com.cloudera.api.swagger.model.ApiCommandList;
import com.cloudera.api.swagger.model.ApiCommandWithSteps;
import java.io.File;
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 CommandsResourceApi
 */
@Ignore
public class CommandsResourceApiTest {

    private final CommandsResourceApi api = new CommandsResourceApi();

    
    /**
     * Abort a running command.
     *
     * Abort a running command.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void abortCommandTest() throws ApiException {
        java.math.BigDecimal commandId = null;
        ApiCommand response = api.abortCommand(commandId);

        // TODO: test validations
    }
    
    /**
     * Download the end result of a command.
     *
     * Download the end result of a command.  Content-Type header is explicitly set in the implementation instead of using annotation. In case the MIME type is not set for the command result, application/octet-stream is set.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void getCommandResultDataTest() throws ApiException {
        java.math.BigDecimal commandId = null;
        File response = api.getCommandResultData(commandId);

        // TODO: test validations
    }
    
    /**
     * Retrieve detailed information of an asynchronous command including the command steps.
     *
     * Retrieve detailed information of an asynchronous command including the command steps.  &lt;p&gt;Cloudera Manager keeps the results and statuses of asynchronous commands, which have non-negative command IDs. On the other hand, synchronous commands complete immediately, and their results are passed back in the return object of the command execution API call. Outside of that return object, there is no way to check the result of a synchronous command.&lt;/p&gt;
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void getCommandWithStepsTest() throws ApiException {
        java.math.BigDecimal commandId = null;
        ApiCommandWithSteps response = api.getCommandWithSteps(commandId);

        // TODO: test validations
    }
    
    /**
     * Download a zip-compressed archive of standard error outputs for the command&#39;s one-off processes.
     *
     * Download a zip-compressed archive of standard error outputs for the command&#39;s one-off processes.  Log files are returned zipped together.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void getStandardErrorTest() throws ApiException {
        java.math.BigDecimal commandId = null;
        File response = api.getStandardError(commandId);

        // TODO: test validations
    }
    
    /**
     * Download a zip-compressed archive of standard outputs for the command&#39;s one-off processes.
     *
     * Download a zip-compressed archive of standard outputs for the command&#39;s one-off processes.  Log files are returned zipped together.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void getStandardOutputTest() throws ApiException {
        java.math.BigDecimal commandId = null;
        File response = api.getStandardOutput(commandId);

        // TODO: test validations
    }
    
    /**
     * Retrieve detailed information on an asynchronous command.
     *
     * Retrieve detailed information on an asynchronous command.  &lt;p&gt;Cloudera Manager keeps the results and statuses of asynchronous commands, which have non-negative command IDs. On the other hand, synchronous commands complete immediately, and their results are passed back in the return object of the command execution API call. Outside of that return object, there is no way to check the result of a synchronous command.&lt;/p&gt;
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void readCommandTest() throws ApiException {
        java.math.BigDecimal commandId = null;
        ApiCommand response = api.readCommand(commandId);

        // TODO: test validations
    }
    
    /**
     * Retrieve detailed information on all recent commands.
     *
     * Retrieve detailed information on all recent commands.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void readCommandsTest() throws ApiException {
        java.math.BigDecimal endTime = null;
        java.math.BigDecimal limit = null;
        String name = null;
        java.math.BigDecimal offset = null;
        java.math.BigDecimal startTime = null;
        Boolean success = null;
        ApiCommandList response = api.readCommands(endTime, limit, name, offset, startTime, success);

        // TODO: test validations
    }
    
    /**
     * Try to rerun a command.
     *
     * Try to rerun a command.
     *
     * @throws ApiException
     *          if the Api call fails
     */
    @Test
    public void retryTest() throws ApiException {
        java.math.BigDecimal commandId = null;
        ApiCommand response = api.retry(commandId);

        // TODO: test validations
    }
    
}
