Exemplo n.º 1
0
        public void Should_Log_Activity_Start()
        {
            var logCode       = defaultBuilder.GenerateMethods(this.activity, new Dictionary <string, string>());
            var generatedCode = TestCodeGeneratorUtils.GenerateCode(logCode[0].Statements);

            Assert.AreEqual("this.logger.Info(\"Start Activity: test_Activity of type: " + ActivityType.NotHandleYet + "\");\nthis.test_Activity.Execute();\n", generatedCode);
        }
Exemplo n.º 2
0
        public void Should_Generate_invocation_method()
        {
            var expected      = @"var configName = ""myconfigPath"";
return this.sharedVariableService.Get(configName);
";
            var generatedCode = TestCodeGeneratorUtils.GenerateCode(activityBuilder.GenerateMethods(this.activity, new Dictionary <string, string>())[0].Statements);

            Assert.IsTrue(generatedCode.EndsWith(expected));
        }
Exemplo n.º 3
0
        public void Should_Generate_invocation_method()
        {
            var expected      = @"this.logger.Info(""Start Activity: MyActivityName of type: com.tibco.pe.core.ConfirmActivity"");
// TODO: Should be this.subscriber.Confirm(message);
this.subscriber.Confirm();
";
            var generatedCode = TestCodeGeneratorUtils.GenerateCode(activityBuilder.GenerateMethods(this.activity, new Dictionary <string, string>())[0].Statements);

            Assert.AreEqual(expected, generatedCode);
        }
        public void Should_Generate_invocation_method()
        {
            var expected      = @"System.String message;
message = ""testvalue"";

var configName = ""myconfigPath"";
this.sharedVariableService.Set(configName, message);
";
            var generatedCode = TestCodeGeneratorUtils.GenerateCode(activityBuilder.GenerateMethods(this.activity, null)[0].Statements);

            Assert.IsTrue(generatedCode.EndsWith(expected));
        }