package enigma.core;

import enigma.core.RotorFactory;
import enigma.core.devices.Rotor;
import enigma.core.util.Alphabet;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

/**
 * RotorFactoryTest.
 *
 * @author diegodc 2017-02-05
 */
class RotorFactoryTest {

    @BeforeEach
    void setUp() {

    }

    @Test
    void newRotorI() {
        Rotor rotor = RotorFactory.rotorI();
        rotor.changePositionTo(Alphabet.Q);
        assertTrue(rotor.isAtTurnoverPosition());
    }

    @Test
    void newRotorII() {
        Rotor rotor = RotorFactory.rotorII();
        rotor.changePositionTo(Alphabet.E);
        assertTrue(rotor.isAtTurnoverPosition());
    }

    @Test
    void newRotorIII() {
        Rotor rotor = RotorFactory.rotorIII();
        rotor.changePositionTo(Alphabet.V);
        assertTrue(rotor.isAtTurnoverPosition());
    }

    @Test
    void newRotorIV() {
        Rotor rotor = RotorFactory.rotorIV();
        rotor.changePositionTo(Alphabet.J);
        assertTrue(rotor.isAtTurnoverPosition());
    }

    @Test
    void newRotorV() {
        Rotor rotor = RotorFactory.rotorV();
        rotor.changePositionTo(Alphabet.Z);
        assertTrue(rotor.isAtTurnoverPosition());
    }

}
@@ -19,41 +19,8 @@
 e;%0A%0A
-import enigma.core.RotorFactory;%0A
 impo
@@ -207,17 +207,26 @@
 ertions.
-*
+assertTrue
 ;%0A%0A/**%0A 
@@ -1255,8 +1255,9 @@
     %7D%0A%0A%7D
+%0A

Package structure changes