Esempio n. 1
0
        public void Test_ListDir_Success()
        {
            var dirName = "Foo";

            this.Client.DeleteDir(dirName);
            this.Client.MakeDir2(dirName);
            var           listResults = this.Client.ListDir("/", 100, 0, true);
            ListDirResult foundResult = null;

            foreach (var dir in listResults)
            {
                if (dir.Name == dirName)
                {
                    foundResult = dir;
                }
            }
            Assert.AreEqual(dirName, foundResult.Name);
            Assert.IsTrue(foundResult.Ctime > 0);
            Assert.IsTrue(foundResult.Mtime > 0);
            Assert.IsTrue(foundResult.Gid > 0);
            Assert.IsTrue(foundResult.Uid > 0);
        }
Esempio n. 2
0
        public void Test_ListDir_Without_Stat()
        {
            var dirName = "Foo";

            this.Client.DeleteDir(dirName);
            this.Client.MakeDir2(dirName);
            var           listResults = this.Client.ListDir("/", 10, 0, false);
            ListDirResult foundResult = null;

            foreach (var dir in listResults)
            {
                if (dir.Name == dirName)
                {
                    foundResult = dir;
                }
            }

            Assert.AreEqual(dirName, foundResult.Name);
            Assert.AreEqual(0, foundResult.Ctime);
            Assert.AreEqual(0, foundResult.Mtime);
            Assert.AreEqual(0, foundResult.Gid);
            Assert.AreEqual(0, foundResult.Uid);
        }