
package org.gm4java.engine.support;

import edu.umd.cs.findbugs.annotations.SuppressWarnings;

import org.gm4java.engine.GMConnection;
import org.junit.Before;
import org.junit.Test;

/**
 * Test cases for {@link BasicGMConnection}.
 * 
 * @author Kenneth Xu
 * 
 */
public class BasicGMConnectionTest extends AbstractGMConnectionTest {
    private BasicGMConnection sut;

    @Before
    public void setup() throws Exception {
        super.setup();
        sut = new BasicGMConnection(process);
    }

    @Test
    @SuppressWarnings("NP_NONNULL_PARAM_VIOLATION")
    public void constructor_chokes_onNullPath() throws Exception {
        exception.expect(NullPointerException.class);
        exception.expectMessage("process");
        new BasicGMConnection(null);
    }

    @Override
    protected GMConnection sut() {
        return sut;
    }
}
