Exemplo n.º 1
0
        public void HadoopFileSystemGetDirectoryRootTest()
        {
            HadoopFileSystem fileSystem = new HadoopFileSystem(this.hostname, this.portNumber, this.authentication);

            // valid parameters

            fileSystem.GetDirectoryRoot("/").ShouldBe("/");
            fileSystem.GetDirectoryRoot(this.directoryPath).ShouldBe("/");

            // exceptions

            Should.Throw <ArgumentNullException>(() => fileSystem.GetDirectoryRoot(null));
            Should.Throw <ArgumentException>(() => fileSystem.GetDirectoryRoot(String.Empty));
        }
        public void HadoopFileSystemGetDirectoryRootTest()
        {
            HadoopFileSystem fileSystem = new HadoopFileSystem(_hostname, _portNumber, _authentication);


            // valid parameters

            Assert.AreEqual("/", fileSystem.GetDirectoryRoot("/"));
            Assert.AreEqual("/", fileSystem.GetDirectoryRoot(_directoryPath));


            // exceptions

            Assert.Throws <ArgumentNullException>(() => fileSystem.GetDirectoryRoot(null));
            Assert.Throws <ArgumentException>(() => fileSystem.GetDirectoryRoot(String.Empty));
        }