package com.cin.test;
import static org.junit.Assert.*;
import org.junit.BeforeClass;
import org.junit.Test;
import com.cin.dto.WageDTO;
import com.cin.ejb.transactionejb.TransactionRemote;
import com.cin.jndi.lookup.EJBLookup;
import com.cin.service.StaticDataService;
import com.cin.test.util.Database;
public class StaticDataServiceTest {
static Database db;
static StaticDataService staticDataService;
static TransactionRemote aRemote;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
db = new Database();
db.resetAllData();
staticDataService = new StaticDataService();
aRemote = EJBLookup.getInstance().getTransactionEJB();
}
@Test
public void testUpdateMeanWeekWage() {
//staticDataService.updateMeanWeekWage();
}
@Test
public void testUpdateMeanWeekWageWithCode() {
WageDTO aDTO = new WageDTO();
aDTO.setIndustryCode(9);
aDTO.setOccupationCode(1);
staticDataService.updateMeanWeekWage(aDTO);
assertTrue(aDTO.getMeanWeekWage() > 0);
}
}