public void List_all_triggers_in_an_instance()
        {
            // Arrange
            QuartzAdmin.web.Controllers.InstanceController controller = GetInstanceController();
            QuartzAdmin.web.Models.InstanceModel           instance   = GetTestInstance();
            controller.Repository.Save(instance);

            // Act
            ActionResult result          = controller.Connect(instance.InstanceName);
            int          countOfTriggers = 0;

            if (result is ViewResult)
            {
                if (((ViewResult)result).ViewData.Model is QuartzAdmin.web.Models.InstanceViewModel)
                {
                    countOfTriggers = ((QuartzAdmin.web.Models.InstanceViewModel)((ViewResult)result).ViewData.Model).Triggers.Count;
                }
            }

            // Assert
            Assert.IsTrue(countOfTriggers > 0);
        }
        public void Verify_quartz_is_running()
        {
            // Arrange
            QuartzAdmin.web.Controllers.InstanceController controller = GetInstanceController();
            QuartzAdmin.web.Models.InstanceModel           instance   = GetTestInstance();
            controller.Repository.Save(instance);

            // Act
            ActionResult result      = controller.Connect(instance.InstanceName);
            bool         isConnected = false;

            if (result is ViewResult)
            {
                if (((ViewResult)result).ViewData.Model is QuartzAdmin.web.Models.InstanceViewModel)
                {
                    isConnected = true;
                }
            }

            // Assert
            Assert.IsTrue(isConnected);
        }