Beispiel #1
0
        public void Should_be_managed_by_kevin()
        {
            var expected    = @"this.getDBDateService.ExecuteQuery();
if (condition_2)
{
	return;
}
else if (condition_1)
{
    this.lastValidDateService.ExecuteQuery();
    if (condition_2)
    {
		return;        
    }
}
this.tradeinvalidService.ExecuteQuery();
if (!GOTO_ERROR)
{
	this.sendmailService.ExecuteQuery();
}
this.errorService.ExecuteQuery();
";
            var tibcoParser = new TibcoBWProcessLinqParser();
            var docXml      = XElement.Load("../../ressources/complex_transition.xml");

            var transitions = tibcoParser.ParseTransitions(docXml);

            var codeStatementCollection = this.builder.GenerateMainCodeStatement(transitions, "start", null, this.activitiesToServiceMapping);

            var classesInString = TestCodeGeneratorUtils.GenerateCode(codeStatementCollection);

            Assert.AreEqual(expected, classesInString);
        }
Beispiel #2
0
        public void Process(string processFileName)
        {
            string projectDirectory = ConfigurationApp.GetProperty(MainClass.ProjectDirectory);

            var tibcoBwProcess = new TibcoBWProcessLinqParser().Parse(processFileName);

            WriteToFile(processFileName, this.projectDir);
            var activities = tibcoBwProcess.Activities;

            this.ProcessActivities(projectDirectory, activities);
        }
        public void Process(string fileName)
        {
            var tibcoBwProcess = new TibcoBWProcessLinqParser ().Parse (fileName);
            var tibcoBWProcessBuilder = new TibcoProcessClassesBuilder ();
            var targetUnit = tibcoBWProcessBuilder.Build (tibcoBwProcess);

            // TODO if exist don't add it ? Ugly but no Config manager on Mono/Xamarin
            if (ConfigurationApp.GetProperty ("IsLoggerAlreadyGenerated") != "true") {
                targetUnit.Namespaces.Add (new LoggerInterfaceBuilder ().Build ());
                ConfigurationApp.SaveProperty ("IsLoggerAlreadyGenerated", "true");
            }

            this.sourceCodeGeneratorService.Generate (targetUnit);
        }
        public void Process(string fileName)
        {
            var tibcoBwProcess        = new TibcoBWProcessLinqParser().Parse(fileName);
            var tibcoBwProcessBuilder = new TibcoProcessClassesBuilder();
            var targetUnit            = tibcoBwProcessBuilder.Build(tibcoBwProcess);

            // TODO if exist don't add it ? Ugly but no Config manager on Mono/Xamarin
            if (ConfigurationApp.GetProperty("IsLoggerAlreadyGenerated") != "true")
            {
                targetUnit.Namespaces.Add(new LoggerInterfaceBuilder().Build());
                ConfigurationApp.SaveProperty("IsLoggerAlreadyGenerated", "true");
            }

            this.sourceCodeGeneratorService.Generate(targetUnit);
        }
Beispiel #5
0
 public void SetUp()
 {
     this.tibcoBwProcessLinqParser = new TibcoBWProcessLinqParser();
 }
 public CallProcessActivityBuilder(XslBuilder xslBuilder, TibcoBWProcessLinqParser parser)
 {
     this.xslBuilder = xslBuilder;
     this.parser     = parser;
 }
 public void SetUp()
 {
     tibcoBWProcessLinqParser = new TibcoBWProcessLinqParser();
 }