Java tutorial
/** * This file is part of LieuOFS. * * LieuOFS is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License. * * LieuOFS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with LieuOFS. If not, see <http://www.gnu.org/licenses/>. */ package org.lieuofs.district.biz.dao; import static org.junit.Assert.assertEquals; import javax.annotation.Resource; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "/beans_lieuofs.xml") public class DistrictOFSFichierTxtDaoTest { @Resource(name = "districtDao") private DistrictOFSDao dao; @Test public void lecture() { // District de la Sarine N OFS 1004 PersistDistrict district = dao.lire(Long.valueOf(10104l)); assertEquals("N OFS de la Sarine", 1004, district.getNumero()); } }