void TestAll() { foreach (KeyValuePair <string, ICommand> item in tests) { MemoryTracker.Start(); string[] args = new string[1]; args[0] = item.Key; item.Value.Execute(args); MemoryTracker.Finish(); } }
void Run(string[] args) { if (args.Length == 0) { Usage(); return; } if (args[0] == "all") { TestAll(); return; } ICommand cmd; if (!this.tests.TryGetValue(args[0], out cmd)) { Usage(); return; } // Check to see if "fips" is an argument, if so, set FIPS mode // here (before any other calls to the crypto lib) foreach (string arg in args) { if (arg.ToLower() == "fips") { Console.WriteLine("Executing test in FIPS mode."); FIPS.Enabled = true; break; } } MemoryTracker.Start(); cmd.Execute(args); MemoryTracker.Finish(); }
public virtual void Setup() { MemoryTracker.Start(); }