protected override IEnumerable <ITestCommand> EnumerateTestCommands(MethodInfo method)
 {
     try
     {
         object obj = Activator.CreateInstance(method.ReflectedType);
         method.Invoke(obj, null);
         return(SpecificationContext.ToTestCommands(method));
     }
     catch (Exception ex)
     {
         return(new ITestCommand[] { new ExceptionTestCommand(method, ex) });
     }
 }
Beispiel #2
0
 public static void When(this string message, Action act)
 {
     Console.Write(">>> " + message);
     SpecificationContext.Do(message, act);
 }
Beispiel #3
0
 public static void Then(this string message, Action assert)
 {
     Console.WriteLine(": " + message);
     SpecificationContext.Assert(message, assert);
 }
Beispiel #4
0
 public static void Given(this string message, Action arrange)
 {
     Console.WriteLine(message);
     SpecificationContext.Context(message, arrange);
 }