public void SetUp()
        {
            BackupCurrentLanguage();
            Compiler = Substitute.For <FeatureCompiler>();
            Compiler.StepNamesOf(null, null).ReturnsForAnyArgs(
                new List <string>());

            Given.Feature.Name = "FeatureName";
            Given.Compiler.Is(Compiler);
        }
Ejemplo n.º 2
0
        public string Generate(string FeatureFilePath, string Content)
        {
            try
            {
                var Feature = Parse(FeatureFilePath, Content);

                GenerateStepDefinitions(Feature);

                FeatureCompiler.Compile(Feature, FeatureItem);

                return(ObjectFactory.NewRunnerGenerator(Feature).Code);
            }
            catch (Exception e)
            {
                return(AppendErrorToOriginalRunner(FeatureFilePath, e));
            }
        }