public void SetUp() { tibcoBWProcessBuilder = new TibcoProcessClassesBuilder (); tibcoBWProcess = new TibcoBWProcess ("MyNamespace/myProcessTest.process"); tibcoBWProcess.Activities = new List<Activity> (); }
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 Should_Return_logger_as_a_privateField() { var tibcoBWProcessBuilder = new TibcoProcessClassesBuilder (); var classToGenerate = tibcoBWProcessBuilder.Build (tibcoBWProcess); var fieldName = ((CodeMemberField)classToGenerate.Namespaces[0].Types[0].Members[0]).Name; Assert.AreEqual ("logger", fieldName); }