Exemplo n.º 1
0
 public void BeginVariation(string variationName)
 {
     if (LoggingState == LoggingState.IsConnected) //Proper scenario
     {
         Loggers.BeginVariation(variationName);
         currentVariationName = variationName;
         currentVariationIndex++;
         hasReceivedBeginVariation = true;
     }
     else if (LoggingState == LoggingState.HasVariation) //We're in a bad state. Synthesize corrective sequence.
     {
         LogMessage("BUG: Test began a second variation without ending the previous one.");
         LogResult(Result.Fail);
         EndVariation(currentVariationName);
         BeginVariation(variationName);
     }
 }