package com.atlassian.bitbucket.mesh.git.hook.script;

import com.google.common.collect.ImmutableList;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class PosixHookScriptCommandLineFactoryTest {

    @Test
    public void testCreate() {
        PosixHookScriptCommandLineFactory factory = new PosixHookScriptCommandLineFactory();
        assertEquals(ImmutableList.of("test"), factory.create("test"));
        assertEquals(ImmutableList.of("foo/bar"), factory.create("foo/bar"));
    }

    @SuppressWarnings("ConstantConditions")
    @Test(expected = NullPointerException.class)
    public void testCreateForNull() {
        new PosixHookScriptCommandLineFactory().create(null);
    }
}
