public void AddRule2Test()
{
bool BooleanValue = false;
int IntegerValue = 0;
string StringValue = "";
var Getopt = new Getopt(new string[] { "-b", "-i", "50", "-s", "hello_world" });
Getopt.AddRule("-b", (bool _Value) =>
{
BooleanValue = _Value;
});
Getopt.AddRule("-i", (int _Value) =>
{
IntegerValue = _Value;
});
Getopt.AddRule("-s", (string _Value) =>
{
StringValue = _Value;
});
Getopt.Process();
Assert.AreEqual(true, BooleanValue);
Assert.AreEqual(50, IntegerValue);
Assert.AreEqual("hello_world", StringValue);
}