Java tutorial
/* * 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 com.itd.dbmrgdao; import com.itd.common.dao.EmployeeDropDownDao; import com.itd.common.dao.GennericDao; import com.itd.regis.db.entity.ScanData; import com.itd.regis.db.entity.ScanDataKey; import com.itd.regis.db.entity.ScanRule; import com.itd.scan.dao.ScanDao; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import java.util.Locale; import javax.swing.JFileChooser; import javax.swing.JOptionPane; import javax.swing.filechooser.FileNameExtensionFilter; import org.junit.Ignore; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.transaction.TransactionConfiguration; import org.springframework.transaction.annotation.Transactional; /** * * @author Administrator Test if employee punch either time-in or timeout will * credit 8:00 and 17:00 */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "classpath:spring/config/BeanLocations.xml") @TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = false) @Transactional public class TestScanData2 { @Autowired ScanDao scanDao; @Autowired GennericDao<ScanData> gennericDao; @Ignore @org.junit.Test public void test() throws ParseException { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.US); // Date fr = dateFormat.parse("2014-07-10"); // Date to = dateFormat.parse("2014-07-15"); // List<ScanData> listScanDatas = scanDao.findScanBetweenDate(fr, to); // System.out.println(listScanDatas); } }