// Path: src/main/java/bdsup2sub/core/Configuration.java
// public static final double MAX_FREE_SCALE_FACTOR = 2.0;
// 
// Path: src/main/java/bdsup2sub/core/Configuration.java
// public static final double MIN_FREE_SCALE_FACTOR = 0.5;


import bdsup2sub.core.*;
import org.apache.commons.cli.ParseException;
import org.junit.Before;
import org.junit.Test;
import java.io.File;
import java.io.FileOutputStream;
import static bdsup2sub.core.Configuration.MAX_FREE_SCALE_FACTOR;
import static bdsup2sub.core.Configuration.MIN_FREE_SCALE_FACTOR;
import static org.junit.Assert.*;
    }

    @Test
    public void shouldAcceptValidAlphaCropThresholdArg() throws Exception {
        subject.parse("--alpha-crop", "75");
        assertEquals(75, subject.getAlphaCropThreshold().get().intValue());
    }

    @Test(expected = ParseException.class)
    public void shouldRejectInvalidScaleXArg() throws Exception {
        subject.parse("--scale", "foo,2");
    }

    @Test(expected = ParseException.class)
    public void shouldRejectInvalidScaleYArg() throws Exception {
        subject.parse("--scale", "2,foo");
    }

    @Test(expected = ParseException.class)
    public void shouldRejectIfMissingScaleArg() throws Exception {
        subject.parse("--scale");
    }

    @Test(expected = ParseException.class)
    public void shouldRejectIfMissingSecondScaleArg() throws Exception {
        subject.parse("--scale", "2");
    }

    @Test(expected = ParseException.class)
    public void shouldRejectOutOfRangeXScaleArg() throws Exception {
// Path: src/main/java/bdsup2sub/core/Configuration.java
// public static final double MAX_FREE_SCALE_FACTOR = 2.0;
// 
// Path: src/main/java/bdsup2sub/core/Configuration.java
// public static final double MIN_FREE_SCALE_FACTOR = 0.5;


// Path: src/test/java/bdsup2sub/cli/CommandLineParserTest.java
import bdsup2sub.core.*;
import org.apache.commons.cli.ParseException;
import org.junit.Before;
import org.junit.Test;
import java.io.File;
import java.io.FileOutputStream;
import static bdsup2sub.core.Configuration.MAX_FREE_SCALE_FACTOR;
import static bdsup2sub.core.Configuration.MIN_FREE_SCALE_FACTOR;
import static org.junit.Assert.*;

    }

    @Test
    public void shouldAcceptValidAlphaCropThresholdArg() throws Exception {
        subject.parse("--alpha-crop", "75");
        assertEquals(75, subject.getAlphaCropThreshold().get().intValue());
    }

    @Test(expected = ParseException.class)
    public void shouldRejectInvalidScaleXArg() throws Exception {
        subject.parse("--scale", "foo,2");
    }

    @Test(expected = ParseException.class)
    public void shouldRejectInvalidScaleYArg() throws Exception {
        subject.parse("--scale", "2,foo");
    }

    @Test(expected = ParseException.class)
    public void shouldRejectIfMissingScaleArg() throws Exception {
        subject.parse("--scale");
    }

    @Test(expected = ParseException.class)
    public void shouldRejectIfMissingSecondScaleArg() throws Exception {
        subject.parse("--scale", "2");
    }

    @Test(expected = ParseException.class)
    public void shouldRejectOutOfRangeXScaleArg() throws Exception {
        subject.parse("--scale", String.valueOf(MIN_FREE_SCALE_FACTOR - 1) + ",1");