package exo2.files;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

class FileTest {
	
	File f;
	
	@BeforeEach
	void init() {
		f = new File("TEST");
	}
	
	@Test
	void test() {
		assertEquals(f.getName(),"TEST");
		
		assertThrows(RuntimeException.class,() -> {
			f.add(new File("test"));
		});
		assertThrows(RuntimeException.class,() -> {
			f.getFile("Nom");
		});
	}

}
