public void TestBasic() { bool lExecuted = false; bool zExecuted = false; var clm = new CommandLineManager(); clm.AddOption("L", "List out the operation.", (clmanager) => lExecuted = true); clm.AddOption("S,Save", "Save the operation."); clm.AddOption("Zebra", "Zero out the operation.", (clmanager) => zExecuted = true); clm.Execute(new[] { "-L", "Data", "-Zebra", "-Save" }); Assert.IsTrue(clm.L); Assert.IsTrue(clm.IsMultipleLetterOptionFound("L")); Assert.IsFalse(clm.IsMultipleLetterOptionFound("Data")); Assert.IsTrue(clm.S); Assert.IsFalse(clm.D); Assert.IsTrue(lExecuted); Assert.IsTrue(clm.IsMultipleLetterOptionFound("Zebra")); Assert.IsFalse(clm.Z); Assert.IsTrue(zExecuted); }