コード例 #1
0
        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.");
        }
コード例 #2
0
        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.");
        }
コード例 #3
0
        public void CreateCommandLineOptionsCollection_EnsureEmpty()
        {
            CommandLineOptionsCollection collection = new CommandLineOptionsCollection();

            Assert.AreEqual(0, collection.Count, "Expected zero elements initially.");
        }