Advertisement
thieumao

QuanLyFileTest

Sep 11th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.94 KB | None | 0 0
  1. package xuly;
  2. import base.CanBo;
  3. import detail.GiangVien;
  4.  
  5. import java.io.File;
  6. import java.util.ArrayList;
  7. import junit.framework.TestCase;
  8. import org.junit.Test;
  9. public class QuanLyFileTest extends TestCase{
  10.    
  11. //    private static final String FILE_NAME = "asm4.dat";
  12.    
  13.     @Test
  14.     public void testHasObject() {
  15.         File file = new File("filekhac.dat");
  16.         boolean actual = QuanLyFile.hasObject(file);
  17.         boolean expected = false;
  18.         assertEquals(expected, actual);
  19.     }
  20.  
  21.     @Test
  22.     public void testWrite() {
  23.         GiangVien giangVien = new GiangVien();
  24.         boolean actual = QuanLyFile.write(giangVien);
  25.         boolean expected = true;
  26.         assertEquals(expected, actual);
  27.     }
  28.  
  29.     @Test
  30.     public void testRead() {       
  31.         ArrayList<CanBo> actual = QuanLyFile.read();
  32.         ArrayList<CanBo> expected = new ArrayList<CanBo>();
  33.         assertEquals(expected, actual);
  34.     }
  35.    
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement