public void ListMain_NoArgs_FileToListIsDot() { var ls = new ListMain(m_emptyArgs); Assert.AreEqual(1, ls.Files.Count()); Assert.AreEqual(".", ls.Files.First()); }
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)); }
public void ListMain_UsageException_AsExpected() { var ls = new ListMain(new string[] { "-BadArg" }); }
public void ListMainCons_AllOptionsSet_Yes() { var ls = new ListMain(new string[] { "-R" }); Assert.AreEqual(true, ls.IsListRecursive); }