public void Testchmod5() { //test chmod 3 (chiffre) Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; Assert.IsFalse(fileCurrent.chmod("-1")); }
public void Testchmod7() { //test chmod 1 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; Assert.IsTrue(fileCurrent.chmod("7")); }
public void Testls1() { //test ls 1 Repertoire C = new Repertoire("C:", null); Fichier filecurrent = C; Assert.AreEqual(0, C.ls().Count); }
public void Testparent1() { //test parent 1 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; Assert.AreEqual(null, fileCurrent.getParent()); }
public void Testname1() { //test name 1 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; Assert.AreEqual(C.Nom, fileCurrent.getName()); }
public void Testchmod2() { //test chmod 2 (lettre) Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; Assert.IsFalse(fileCurrent.chmod("testfalse")); }
public void Testcreate2() { //test create 2 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; Assert.IsFalse(fileCurrent.createNewFile("C2")); }
public void Testmkdir1() { //test mkdir 1 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; Assert.IsFalse(fileCurrent.mkdir("C2")); }
public void Testparent2_1() { //test parent 2.1 Repertoire C = new Repertoire("C:", null); Fichier C2 = new Fichier("C2", C); Fichier fileCurrent = C2; Assert.AreEqual(C, fileCurrent.getParent()); }
public void Testmkdir2() { //test mkdir 2 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; fileCurrent.chmod("7"); Assert.IsTrue(fileCurrent.mkdir("C2")); }
public void Testcd1() { //test cd 1 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; fileCurrent = fileCurrent.cd("toto"); Assert.AreEqual(C, fileCurrent); }
public void Testcreate1() { //test create 1 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; fileCurrent.chmod("7"); Assert.IsTrue(fileCurrent.createNewFile("C2")); }
public void Testname2() { //test name 2 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; fileCurrent.chmod("1"); Assert.AreEqual(null, fileCurrent.getName()); }
public void Testdelete1() { //test delete 1 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; fileCurrent.chmod("7"); Assert.IsFalse(fileCurrent.delete("toto")); }
public void Testfiledirectory2() { //test file&directory 1 Repertoire C = new Repertoire("C:", null); Fichier D = new Fichier("D", C); Fichier fileCurrent = C; Assert.IsTrue(fileCurrent.isDirectory()); }
public void Testdelete2() { //test delete 2 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; fileCurrent.chmod("7"); fileCurrent.mkdir("toto"); Assert.IsTrue(fileCurrent.delete("toto")); }
public void Testparent3_1() { //test parent 3.1 Repertoire C = new Repertoire("C:", null); Fichier C2 = new Fichier("C2", C); Fichier fileCurrent = C2; fileCurrent.chmod("1"); Assert.AreEqual(null, fileCurrent.getParent()); }
public void Testls2() { //test ls 2 Repertoire C = new Repertoire("C:", null); Fichier filecurrent = C; filecurrent.chmod("7"); filecurrent.mkdir("toto"); Assert.AreEqual(1, C.ls().Count); }
public void Testrename2_3() { //test rename 2.3 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; fileCurrent.chmod("7"); fileCurrent.createNewFile("toto"); Assert.IsTrue(fileCurrent.renameTo("toto", "tata")); }
public void Testsearch2_1() { //test search 2 Repertoire C = new Repertoire("C:", null); Fichier filecurrent = C; filecurrent.chmod("7"); filecurrent.mkdir("titi"); Assert.AreEqual(0, C.search("tata").Count); }
public void Testcd2() { //test cd 2 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; fileCurrent.chmod("7"); fileCurrent.mkdir("toto"); fileCurrent = fileCurrent.cd("toto"); Assert.AreEqual(C.fichieR[0], fileCurrent); }
public void Testrename3_2() { //test rename 3.2 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; fileCurrent.chmod("7"); fileCurrent.createNewFile("toto"); fileCurrent.mkdir("tata"); Assert.IsFalse(fileCurrent.renameTo("toto", "tata")); }
public void Testpath1_2() { //test path 1.2, donne la même chose que le testpath1_1, pas de diff file/directory Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; fileCurrent.chmod("7"); fileCurrent.createNewFile("toto"); fileCurrent = fileCurrent.cd("toto"); Assert.AreEqual("C:\\toto", fileCurrent.getPath()); }
public void Testpath1_1() { //test path 1.1 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; fileCurrent.chmod("7"); fileCurrent.mkdir("toto"); fileCurrent = fileCurrent.cd("toto"); Assert.AreEqual("C:\\toto", fileCurrent.getPath()); }
public void Testroot3() { //test root 3 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; fileCurrent.chmod("7"); fileCurrent.mkdir("toto"); fileCurrent = fileCurrent.cd("toto"); Assert.AreEqual("Vous êtes déjà dans un fichier racine", fileCurrent.getRoot()); }
public void Testls6() { //test ls 6 Repertoire C = new Repertoire("C:", null); Fichier filecurrent = C; filecurrent.chmod("7"); filecurrent.mkdir("toto"); filecurrent.createNewFile("tata"); Assert.AreEqual(2, C.ls().Count); }
public void Testls4() { //test ls 4 Repertoire C = new Repertoire("C:", null); Fichier filecurrent = C; filecurrent.chmod("7"); filecurrent.createNewFile("toto"); filecurrent = filecurrent.cd("toto"); //un ls dans un fichier renvoie un consolewriteline et un null Assert.AreEqual(null, filecurrent.ls()); }
public void Testroot3_1() { //test root 3.1 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; fileCurrent.chmod("7"); fileCurrent.mkdir("toto"); fileCurrent = fileCurrent.cd("toto"); fileCurrent.chmod("1"); Assert.AreEqual(null, fileCurrent.getRoot()); }
public void Testroot2() { //test root 2 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; fileCurrent.chmod("7"); fileCurrent.mkdir("toto"); fileCurrent = fileCurrent.cd("toto"); fileCurrent.chmod("7"); fileCurrent.createNewFile("tata"); fileCurrent = fileCurrent.cd("tata"); Assert.AreEqual("toto", fileCurrent.getRoot()); }
public void Testcd4() { //test cd 3 Repertoire C = new Repertoire("C:", null); Fichier fileCurrent = C; fileCurrent.chmod("7"); fileCurrent.createNewFile("tata"); fileCurrent = fileCurrent.cd("tata"); fileCurrent.chmod("7"); fileCurrent.createNewFile("toto"); fileCurrent = fileCurrent.cd("toto"); Assert.AreEqual(C.fichieR[0], fileCurrent); }