예제 #1
0
 string GetSkipReason(SkipBehavior skipBehavior, Case @case)
 {
     try
     {
         return(skipBehavior.GetSkipReason(@case));
     }
     catch (Exception exception)
     {
         throw new Exception(
                   "Exception thrown while attempting to get a custom case-skipped reason. " +
                   "Check the inner exception for more details.", exception);
     }
 }
예제 #2
0
 bool SkipCase(SkipBehavior skipBehavior, Case @case)
 {
     try
     {
         return(skipBehavior.SkipCase(@case));
     }
     catch (Exception exception)
     {
         throw new Exception(
                   "Exception thrown while attempting to run a custom case-skipping predicate. " +
                   "Check the inner exception for more details.", exception);
     }
 }
예제 #3
0
    private void PickBehavior()
    {
        int m_behavior = Random.Range(0, 3);

        switch (m_behavior)
        {
        case 0:
            m_skipBehavior = SkipBehavior.BasicBehavior;
            break;

        case 1:
            m_skipBehavior = SkipBehavior.StrategicBehavior;
            break;

        case 2:
            m_skipBehavior = SkipBehavior.CopyBehavior;
            break;

        default:
            m_skipBehavior = SkipBehavior.BasicBehavior;
            break;
        }
    }
예제 #4
0
 string GetSkipReason(SkipBehavior skipBehavior, Case @case)
 {
     try
     {
         return skipBehavior.GetSkipReason(@case);
     }
     catch (Exception exception)
     {
         throw new Exception(
             "Exception thrown while attempting to get a custom case-skipped reason. " +
             "Check the inner exception for more details.", exception);
     }
 }
예제 #5
0
 bool SkipCase(SkipBehavior skipBehavior, Case @case)
 {
     try
     {
         return skipBehavior.SkipCase(@case);
     }
     catch (Exception exception)
     {
         throw new Exception(
             "Exception thrown while attempting to run a custom case-skipping predicate. " +
             "Check the inner exception for more details.", exception);
     }
 }
예제 #6
0
 /// <summary>
 /// Allows the specified predicate to determine whether a given test case should be skipped
 /// during execution. Skipped test cases are never executed, but are counted and identified.
 /// When a test is skipped, the behavior may include an optional explanation in the output.
 /// </summary>
 public CaseBehaviorExpression Skip(SkipBehavior behavior)
 {
     return(Skip(behavior.SkipCase, behavior.GetSkipReason));
 }
예제 #7
0
 public void AddSkipBehavior(SkipBehavior skipBehavior)
 {
     skipBehaviors.Add(skipBehavior);
 }
예제 #8
0
 public void AddSkipBehavior(SkipBehavior skipBehavior)
 {
     skipBehaviors.Add(skipBehavior);
 }