@@ -0,0 +1,1919 @@
+/*%0A * To change this template, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0A%0Apackage edu.stuy.commands;%0A%0Aimport edu.stuy.JoeBot;%0Aimport edu.stuy.InitTests;%0Aimport org.junit.After;%0Aimport org.junit.AfterClass;%0Aimport org.junit.Before;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0Aimport static org.junit.Assert.*;%0A%0A/**%0A *%0A * @author 694%0A */%0Apublic class AcquirerAcquireTest %7B%0A%0A    public AcquirerAcquireTest() %7B%0A    %7D%0A%0A    @BeforeClass%0A    public static void setUpClass() throws Exception %7B%0A        InitTests.setUpTests(InitTests.NO_PHYSICS);%0A        JoeBot j = new JoeBot();%0A        j.robotInit();%0A    %7D%0A%0A    @AfterClass%0A    public static void tearDownClass() throws Exception %7B%0A        InitTests.tearDownTests();%0A    %7D%0A%0A    @Before%0A    public void setUp() %7B%0A    %7D%0A%0A    @After%0A    public void tearDown() %7B%0A    %7D%0A%0A    /**%0A     * Should not run the conveyor%0A     * -Bottom Sensor does not sense a ball%0A     * Result: don't run conveyor%0A     */%0A    @Test%0A    public void testRunNoBallNoConvey() %7B%0A        sensorDoesNotSense();%0A        AcquirerAcquire cmd = new AcquirerAcquire();%0A        cmd.execute();%0A        assertConveyorIsNotRunning();%0A    %7D%0A%0A    /**%0A     * Should run the conveyor%0A     * -Bottom Sensor senses a ball%0A     * Result: run conveyor%0A     */%0A    @Test%0A    public void testRunYesBallConvey() %7B%0A        sensorDoesSense();%0A        AcquirerAcquire cmd = new AcquirerAcquire();%0A        cmd.execute();%0A        assertConveyorIsRunning();%0A    %7D%0A%0A    public void sensorDoesNotSense() %7B%0A        CommandBase.conveyor.lowerSensor.value = false;%0A    %7D%0A%0A    public void sensorDoesSense() %7B%0A        CommandBase.conveyor.lowerSensor.value = true;%0A    %7D%0A%0A    public void assertConveyorIsNotRunning() %7B%0A        assertEquals(0, CommandBase.conveyor.getRoller(), 0.01);%0A    %7D%0A%0A    public void assertConveyorIsRunning() %7B%0A        assertEquals(1, CommandBase.conveyor.getRoller(), 0.01);%0A    %7D%0A%7D

Add AcquirerAcquireTest