예제 #1
0
 public static void AssertResult(ReturnValue result)
 {
     if (!result.Success)
     {
         Assert.Fail(result.ToString());
     }
 }
예제 #2
0
 protected bool ShowStatus(ReturnValue result, string context)
 {
     if (!result.Success)
     {
         MessageBox.Show(result.ToString(), context,
             MessageBoxButtons.OK, MessageBoxIcon.Error);
         ShowStatus(string.Format("{0} failed.", context), Color.Red);
         Debug.WriteLine(result);
     }
     ShowStatus(string.Format("{0} complete.", context));
     return result.Success;
 }