Biblioteca Java - Rev 32

Subversion Repositories:
Rev:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package elevatorcurs.model;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author Mihai Hulea mihai.hulea@aut.utcluj.ro
 */

public class ElevatorTest {
   
    public ElevatorTest() {
    }
   
    @BeforeClass
    public static void setUpClass() {
    }
   
    @AfterClass
    public static void tearDownClass() {
    }
   
    @Before
    public void setUp() {
    }
   
    @After
    public void tearDown() {
    }

    /**
     * Test of move method, of class Elevator.
     */

    @Test
    public void testMove() {
        System.out.println("move");
        Elevator instance = new Elevator();
        instance.move();
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of setCurrentDir method, of class Elevator.
     */

    @Test
    public void testSetCurrentDir() {
        System.out.println("set setCurrentDir");
        Direction currentDir = Direction.DOWN;
        Elevator instance = new Elevator();
        instance.setCurrentDir(currentDir);
        assertEquals(Direction.DOWN,    instance.getCurrentDir());
       
        instance.setCurrentDir(Direction.UP);
        assertEquals(Direction.UP,    instance.getCurrentDir());
    }

    /**
     * Test of getPosition method, of class Elevator.
     */

    @Test
    public void testGetPosition() {
        System.out.println("getPosition");
        Elevator instance = new Elevator();
        int expResult = 0;
        int result = instance.getPosition();
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

    /**
     * Test of toString method, of class Elevator.
     */

    @Test
    public void testToString() {
        System.out.println("toString");
        Elevator instance = new Elevator();
        String expResult = "";
        String result = instance.toString();
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }
   
}