public TestFileGeneratorResult GenerateCodeBehindFile(string featureFile)
        {
            var featureFileInput         = new FeatureFileInput(featureFile);
            var generatedFeatureFileName = Path.GetFileName(_testGenerator.GetTestFullPath(featureFileInput));

            var testGeneratorResult = _testGenerator.GenerateTestFile(featureFileInput, new GenerationSettings());

            return(new TestFileGeneratorResult(testGeneratorResult, generatedFeatureFileName));
        }
Ejemplo n.º 2
0
        public GeneratedCodeBehindFile GenerateCodeBehindFile(string featureFile)
        {
            var featureFileInput         = new FeatureFileInput(featureFile);
            var generatedFeatureFileName = Path.GetFileName(_testGenerator.GetTestFullPath(featureFileInput));

            var testGeneratorResult = _testGenerator.GenerateTestFile(featureFileInput, new GenerationSettings());

            string outputFileContent;

            if (testGeneratorResult.Success)
            {
                outputFileContent = testGeneratorResult.GeneratedTestCode;
            }
            else
            {
                outputFileContent = GenerateError(testGeneratorResult, _codeDomHelper);
            }

            return(new GeneratedCodeBehindFile()
            {
                Filename = generatedFeatureFileName,
                Content = outputFileContent
            });
        }
Ejemplo n.º 3
0
 protected virtual TestGeneratorResult GenerateTestFile(ITestGenerator generator, FeatureFileInput featureFileInput, GenerationSettings generationSettings)
 {
     return(generator.GenerateTestFile(featureFileInput, generationSettings));
 }
Ejemplo n.º 4
0
 protected virtual TestGeneratorResult GenerateTestFile(ITestGenerator generator, FeatureFileInput featureFileInput, GenerationSettings generationSettings)
 {
     return generator.GenerateTestFile(featureFileInput, generationSettings);
 }
Ejemplo n.º 5
0
 public TestGeneratorResult GenerateTestFile(FeatureFileInput featureFileInput, GenerationSettings settings)
 {
     return(innerGenerator.GenerateTestFile(featureFileInput, settings));
 }