protected override TestGeneratorResult GenerateTestFile(ITestGenerator generator, FeatureFileInput featureFileInput, GenerationSettings generationSettings)
        {
            try
            {
                var result = base.GenerateTestFile(generator, featureFileInput, generationSettings);

                if (result.IsUpToDate)
                {
                    outputFile.Skip();
                }
                else
                {
                    outputFile.Done(task.Errors);
                }

                return(result);
            }
            catch (Exception ex)
            {
                task.RecordException(ex);
                return(new TestGeneratorResult(new TestGenerationError(ex)));
            }
            finally
            {
                outputFile = null;
            }
        }
예제 #2
0
 protected override void GenerateFile(SpecFlowGenerator generator, SpecFlowFeatureFile featureFile, string codeFileFullPath)
 {
     try
     {
         base.GenerateFile(generator, featureFile, codeFileFullPath);
         outputFile.Done(task.Errors);
     }
     catch (Exception ex)
     {
         task.RecordException(ex);
     }
     finally
     {
         outputFile = null;
     }
 }