Esempio n. 1
0
        public void HowToUseTaskInOtherNetApplication()
        {
            ////
            IFlubuEngine engine  = new FlubuEngine();
            var          session = engine.CreateTaskSession(new BuildScriptArguments());

            session.Tasks().DeleteDirectoryTask("Example", true).Execute(session);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            if (args.Length < 1)
            {
                args = new string[] { "compile" };
            }

            var engine = new FlubuEngine();

            engine.RunScript <BuildScript>(args);
        }
        //// You can just test your code in do (Custom code)
        public void TestDoExample()
        {
            if (File.Exists("test123.txt"))
            {
                File.Delete("test123.txt");
            }

            BuildScriptForTestsAndDebugExample bs = new BuildScriptForTestsAndDebugExample();

            IFlubuEngine engine = new FlubuEngine();

            var session = engine.CreateTaskSession(new BuildScriptArguments());

            bs.CreateFile(session);
            Assert.True(File.Exists("test123.txt"));
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            args = new[] { "Test" };
            var engine = new FlubuEngine();

            int scriptId = 1; // for easy switching test scripts.

            switch (scriptId)
            {
            case 0:
                engine.RunScript <DefaultTestScript>(args);
                break;

            case 1:
                engine.RunScript <TestScriptWithAsync>(new string[] { });
                break;
            }
        }
        public void TestTargetExample()
        {
            if (File.Exists("test123.txt"))
            {
                File.Delete("test123.txt");
            }

            IFlubuEngine engine = new FlubuEngine();

            var session = engine.CreateTaskSession(new BuildScriptArguments
            {
                MainCommands = new List <string>()
                {
                    "TestAndDebugExample"
                }
            });

            BuildScriptForTestsAndDebugExample bs = new BuildScriptForTestsAndDebugExample();

            var result = bs.Run(session);

            Assert.Equal(0, result);
            Assert.True(File.Exists("test123.txt"));
        }
Esempio n. 6
0
        static void Main(string[] args)
        {
            var engine = new FlubuEngine();

            engine.RunScript <BuildScript>(new string[] { "compile" });
        }
        public static void Main(string[] args)
        {
            var engine = new FlubuEngine();

            engine.RunScript <BuildScript>(args);
        }