Package org.cyclopsgroup.jmxterm.cmd

Source Code of org.cyclopsgroup.jmxterm.cmd.OptionCommandTest

package org.cyclopsgroup.jmxterm.cmd;

import java.io.StringWriter;

import org.cyclopsgroup.jmxterm.MockSession;
import org.cyclopsgroup.jmxterm.Session;
import org.junit.Before;
import org.junit.Test;

/**
* Test for {@link OptionCommand}
*
* @author <a href="mailto:jiaqi.guo@gmail.com">Jiaqi Guo</a>
*/
public class OptionCommandTest
{
    private OptionCommand command;

    private StringWriter output;

    /**
     * Set up object to test
     */
    @Before
    public void setUp()
    {
        command = new OptionCommand();
        output = new StringWriter();
    }

    /**
     * @throws Exception
     */
    @Test( expected = IllegalArgumentException.class )
    public void testExecuteWithInvalidVerbose()
        throws Exception
    {
        Session session = new MockSession( output, null );
        command.setVerboseLevel( "xyz" );
        command.setSession( session );
        command.execute();
    }
}
TOP

Related Classes of org.cyclopsgroup.jmxterm.cmd.OptionCommandTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.