public void GetCmdLinePropertiesTest() { var parser = new CmdLineParser <TestCmdLineObj>(); var obj = new TestCmdLineObj(); var props = parser.GetCmdLineProperties(obj); Assert.AreEqual(7, props.Count); var prop = props["Name"]; Assert.IsNotNull(prop); Assert.AreEqual("Name", prop.Name); prop = props["N"]; // Use an abbreviated name. Assert.IsNotNull(prop); Assert.AreEqual("Name", prop.Name); prop = props["age"]; // Use a different case. Assert.IsNotNull(prop); Assert.AreEqual("Age", prop.Name); Assert.IsFalse(prop.ValueSet); prop.Value = 23; Assert.IsTrue(prop.ValueSet); Assert.AreEqual(23, obj.Age); }