public void AddRule4Test() { int ExecutedCount = 0; var Getopt = new Getopt(new string[] { "-a", "-a" }); Getopt.AddRule("-a", () => { ExecutedCount++; }); Getopt.Process(); Assert.AreEqual(2, ExecutedCount); } }