예제 #1
0
        public void ListMain_NoArgs_FileToListIsDot()
        {
            var ls = new ListMain(m_emptyArgs);

            Assert.AreEqual(1, ls.Files.Count());
            Assert.AreEqual(".", ls.Files.First());
        }
예제 #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));
        }
예제 #3
0
 public void ListMain_UsageException_AsExpected()
 {
     var ls = new ListMain(new string[] { "-BadArg" });
 }
예제 #4
0
        public void ListMainCons_AllOptionsSet_Yes()
        {
            var ls = new ListMain(new string[] { "-R" });

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