UpdateWorkingStatusTest.java
package durbodax.commands.customer;
import durbodax.customers.CustomerData;
import durbodax.customers.Enums.WorkingClass;
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 Kirk Seddon
*/
public class UpdateWorkingStatusTest {
public UpdateWorkingStatusTest() {
}
@BeforeClass
public static void setUpClass() throws Exception {
}
@AfterClass
public static void tearDownClass() throws Exception {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
/**
* Test of execute method, of class UpdateWorkingStatus.
*/
@Test
public void testExecute() {
System.out.println("execute");
String[] input = new String[] { "command","3" };
UpdateWorkingStatus instance = new UpdateWorkingStatus();
instance.execute(input);
assertEquals(3, CustomerData.CUSTOMER.getCustomer().getWorkClass());
assertEquals(WorkingClass.NEW_WORKER, CustomerData.CUSTOMER.getCustomer().getWorkClassEnum());
}
}