protected override FeatureFileInput CreateFeatureFileInput(FeatureFileInput featureFile, ITestGenerator generator, SpecFlowProject specFlowProject) { var featureFileInput = base.CreateFeatureFileInput(featureFile, generator, specFlowProject); outputFile = task.PrepareOutputFile(generator.GetTestFullPath(featureFileInput)); featureFileInput.GeneratedTestProjectRelativePath = FileSystemHelper.GetRelativePath(outputFile.FilePathForWriting, specFlowProject.ProjectSettings.ProjectFolder); return(featureFileInput); }
protected override FeatureFileInput CreateFeatureFileInput(FeatureFileInput featureFile, ITestGenerator generator, SpecFlowProject specFlowProject) { var featureFileInput = base.CreateFeatureFileInput(featureFile, generator, specFlowProject); outputFile = task.PrepareOutputFile(generator.GetTestFullPath(featureFileInput)); featureFileInput.GeneratedTestProjectRelativePath = FileSystemHelper.GetRelativePath(outputFile.FilePathForWriting, specFlowProject.ProjectSettings.ProjectFolder); return featureFileInput; }
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)); }
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 }); }
public string GetTestFullPath(FeatureFileInput featureFileInput) { return(innerGenerator.GetTestFullPath(featureFileInput)); }