Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package xuly;
- import base.CanBo;
- import detail.GiangVien;
- import java.io.File;
- import java.util.ArrayList;
- import junit.framework.TestCase;
- import org.junit.Test;
- public class QuanLyFileTest extends TestCase{
- // private static final String FILE_NAME = "asm4.dat";
- @Test
- public void testHasObject() {
- File file = new File("filekhac.dat");
- boolean actual = QuanLyFile.hasObject(file);
- boolean expected = false;
- assertEquals(expected, actual);
- }
- @Test
- public void testWrite() {
- GiangVien giangVien = new GiangVien();
- boolean actual = QuanLyFile.write(giangVien);
- boolean expected = true;
- assertEquals(expected, actual);
- }
- @Test
- public void testRead() {
- ArrayList<CanBo> actual = QuanLyFile.read();
- ArrayList<CanBo> expected = new ArrayList<CanBo>();
- assertEquals(expected, actual);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement