public void TriggerTable() {
     var trigger = new DummyTrigger {
         Key = new TriggerKey("myCronTrigger", "DEFAULT"),
         JobKey = new JobKey("someJob", "DEFAULT"),
     };
     var triggers = new[] {
         new TriggerWithState(trigger, TriggerState.Normal),
     };
     var x = Views.Views.TriggerTable(triggers, "/", highlight: "DEFAULT.myCronTrigger");
     var tr = x.Descendants().First(e => {
         var id = e.Attribute("id");
         if (id == null)
             return false;
         return id.Value == "DEFAULT.myCronTrigger";
     });
     Assert.AreEqual("highlight", tr.Attribute("class").Value);
     //var html = x.MakeHTMLCompatible();
     //Console.WriteLine(html);
 }
Пример #2
0
        public void TriggerTable()
        {
            var trigger = new DummyTrigger {
                Key    = new TriggerKey("myCronTrigger", "DEFAULT"),
                JobKey = new JobKey("someJob", "DEFAULT"),
            };
            var triggers = new[] {
                new TriggerWithState(trigger, TriggerState.Normal),
            };
            var x  = Views.Views.TriggerTable(triggers, "/", highlight: "DEFAULT.myCronTrigger");
            var tr = x.Descendants().First(e => {
                var id = e.Attribute("id");
                if (id == null)
                {
                    return(false);
                }
                return(id.Value == "DEFAULT.myCronTrigger");
            });

            Assert.AreEqual("highlight", tr.Attribute("class").Value);
            //var html = x.MakeHTMLCompatible();
            //Console.WriteLine(html);
        }