示例#1
0
        public void OpenReadWriteFailReturnsNull()
        {
            StdFSFile file   = new StdFSFile();
            Stream    stream = file.OpenReadWrite();

            Assert.Null(stream);
        }
示例#2
0
        public void GetFile()
        {
            StdFSFile file = (StdFSFile)_root.GetFile("file1");

            Assert.NotNull(file);
            Assert.AreEqual("file1", file.Name);
            Assert.AreEqual(_rootPath + "/file1", file.Path);
            Assert.AreEqual(_root, file.Parent);
        }
示例#3
0
        public void GetFiles()
        {
            File422        file1    = new StdFSFile(_rootPath + "/file1", "file1", _root);
            List <File422> expected = new List <File422>();

            expected.Add(file1);

            List <File422> files = (List <File422>)_root.GetFiles();

            Assert.NotNull(files);
            Assert.AreEqual(expected.Count, files.Count);
            //Assert.AreEqual(expected, files);
        }
示例#4
0
        public void GetFileThatDoesntExist()
        {
            StdFSFile file = (StdFSFile)_root.GetFile("file2");

            Assert.Null(file);
        }