Ejemplo n.º 1
0
        public void ListMain_NoArgs_FileToListIsDot()
        {
            var ls = new ListMain(m_emptyArgs);

            Assert.AreEqual(1, ls.Files.Count());
            Assert.AreEqual(".", ls.Files.First());
        }
Ejemplo n.º 2
0
        public void ListMain_When123SpecifiedToList_FilesAre123()
        {
            var ls = new ListMain(new string[] { "1", "2", "3"});

            Assert.AreEqual(3, ls.Files.Count());
            Assert.AreEqual("1", ls.Files.ElementAt(0));
            Assert.AreEqual("2", ls.Files.ElementAt(1));
            Assert.AreEqual("3", ls.Files.ElementAt(2));
        }
Ejemplo n.º 3
0
 public void ListMain_UsageException_AsExpected()
 {
     var ls = new ListMain(new string[] { "-BadArg" });
 }
Ejemplo n.º 4
0
        public void ListMainCons_AllOptionsSet_Yes()
        {
            var ls = new ListMain(new string[] { "-R" });

            Assert.AreEqual(true, ls.IsListRecursive);
        }