Ejemplo n.º 1
0
        public void ConfigureTargetWithIisTasks()
        {
            ITaskSession session = _sp.GetRequiredService <ITaskSession>();

            SimpleBuildScript bs = new SimpleBuildScript();

            bs.Run(session);

            Assert.True(session.TargetTree.HasAllTargets(new List <string>()
            {
                "IIS"
            }, out _));

            Target t = (Target)session.TargetTree.GetTarget("IIS");

            Assert.Equal(2, t.TasksGroups.Count);
            Assert.Empty(t.Dependencies);
        }
Ejemplo n.º 2
0
        public void ConfigureTargetWithLinuxTasks()
        {
            var session = _sp.GetRequiredService <IFlubuSession>();

            var bs = new SimpleBuildScript();

            bs.Run(session);

            Assert.True(session.TargetTree.HasAllTargets(new List <string>()
            {
                "Linux"
            }, out _));

            var t = (Target)session.TargetTree.GetTarget("Linux");

            Assert.Equal(2, t.TasksGroups.Count);
            Assert.Empty(t.Dependencies);
        }
Ejemplo n.º 3
0
        public void ConfigureSimpleTarget()
        {
            ITaskSession session = _sp.GetRequiredService <ITaskSession>();

            SimpleBuildScript bs = new SimpleBuildScript();

            bs.Run(session);

            Assert.True(session.TargetTree.HasAllTargets(new List <string>()
            {
                "test"
            }, out _));
            Assert.True(session.TargetTree.HasAllTargets(new List <string>()
            {
                "test1"
            }, out _));

            ITargetInternal t  = session.TargetTree.GetTarget("test");
            ITargetInternal t1 = session.TargetTree.GetTarget("test1");

            Assert.Equal(t.TargetName, t1.Dependencies.FirstOrDefault().Key);
        }