public void CreateCommandLineOptionsCollection_AddSingleItem_CheckCount() { CommandLineOptionsCollection collection = new CommandLineOptionsCollection(); collection.Add(new SwitchAttribute("EnableLogging") { ShortHandName = "log" }); Assert.AreEqual(1, collection.Count, "Expected zero elements initially."); }
public void CreateCommandLineOptionsCollection_AddSingleItem_RecallByShortName_LowerCase() { CommandLineOptionsCollection collection = new CommandLineOptionsCollection(); collection.Add(new SwitchAttribute("EnableLogging") { ShortHandName = "LOG" }); SwitchAttribute attribute = (SwitchAttribute)collection["log"]; Assert.IsNotNull(attribute, "Should have recalled the attribute."); }