public void DeleteDirectoryTest()
 {
     DirectoryModel target = new DirectoryModel();
     int direstoryId = 8;
     int userId = 2;
     target.DeleteDirectory(direstoryId, userId);
 }
 public void CreateDirectoryByNameTest()
 {
     DirectoryModel target = new DirectoryModel();
     int userId = 2;
     string name = "folder4";
     int parentId = 198;
     bool isPublic = false;
     int directoryId = target.CreateDirectoryByName(userId, name, parentId, isPublic);
 }
 public void CreateDirectoryTest()
 {
     DirectoryModel target = new DirectoryModel();
     if(target.Exist(@"\test2\test4",2))
     {
         Directory directoryInfo = target.GetDirectory(@"\test2\test4",2);
         target.DeleteDirectory(directoryInfo.DirectoryId, 2);
     }
     int userId = 2;
     string patch = @"\test2\test4";
     bool isPublic = false;
     target.CreateDirectory(userId, patch, isPublic);
 }
 public void DirectoryModelConstructorTest()
 {
     DirectoryModel target = new DirectoryModel();
 }
 public void MoveTest()
 {
     DirectoryModel target = new DirectoryModel();
     int directoryId = 244;
     int outDirectoryId = 198;
     int userId = 2;
     target.Move(directoryId, outDirectoryId, userId);
     Assert.Inconclusive("Невозможно проверить метод, не возвращающий значение.");
 }
        public void GetDirectoryTest()
        {
            DirectoryModel target = new DirectoryModel();
            string patch = "\\test1";
            int userId = 2;

            Directory actual = target.GetDirectory(patch, userId);
            if (actual.DirectoryId !=2)
                Assert.Fail();
        }
        public void GetParentDirectoryTest()
        {
            DirectoryModel target = new DirectoryModel();
            int userId = 2;
            string patch = @"\test2\test3";

            Directory actual = target.GetParentDirectory(patch, userId);
            if (actual.DirectoryId != 7)
                Assert.Fail();
        }
 public void GetDirectoryPathTest()
 {
     DirectoryModel target = new DirectoryModel();
     int directoryId = 194;
     int userId = 2;
     string expected = string.Empty;
     string actual;
     actual = target.GetDirectoryPath(directoryId, userId);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Проверьте правильность этого метода теста.");
 }
        public void GetChildDirectoriesTest()
        {
            DirectoryModel target = new DirectoryModel();
            int parentId = 2;
            int userId = 2;

            List<Directory>  actual = target.GetChildDirectories(parentId, userId);
            if (actual.Count != 2)
                Assert.Fail();
        }
 public void ExistTest()
 {
     DirectoryModel target = new DirectoryModel();
     string path = @"\test1\test2";
     int userId = 2;
     bool expected = true;
     bool actual = target.Exist(path, userId);
     Assert.AreEqual(expected, actual);
 }
        public void ExistDirectoryInMovedPathTest()
        {
            DirectoryModel target = new DirectoryModel();
            int directoryId = 213;
            int outDirectoryId = 215;
            int userId = 2;

            if(!target.ExistDirectoryInMovedPath(directoryId, outDirectoryId, userId))
                Assert.Fail();

            directoryId = 214;
            outDirectoryId = 198;

            if (target.ExistDirectoryInMovedPath(directoryId, outDirectoryId, userId))
                Assert.Fail();
        }
 public void ExistByNameTest()
 {
     DirectoryModel target = new DirectoryModel();
     string name = "folder1_1";
     int parentId = 242;
     int userId = 2;
     bool expected = false;
     bool actual;
     actual = target.ExistByName(name, parentId, userId);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Проверьте правильность этого метода теста.");
 }