public void DoesInstanceConnect()
        {
            QuartzAdmin.web.Models.InstanceRepository instanceRepo = new QuartzAdmin.web.Models.InstanceRepository();
            QuartzAdmin.web.Models.InstanceModel      instance     = instanceRepo.GetInstance("Instance1");

            try
            {
                Quartz.IScheduler sched = instance.GetQuartzScheduler();
                Assert.IsNotNull(sched);
            }
            catch (Exception ex)
            {
                Assert.Fail("Error connecting", ex);
            }
        }
        public void DoesInstanceConnect2()
        {
            Story instanceConnectStory = new Story("Connect to instance");

            QuartzAdmin.web.Models.InstanceRepository instanceRepo = new QuartzAdmin.web.Models.InstanceRepository();
            QuartzAdmin.web.Models.InstanceModel      instance     = null;
            Quartz.IScheduler sched = null;

            instanceConnectStory
            .AsA("System Admin")
            .IWant("to connect to a running quartz instance")
            .SoThat("I can perform admin functions");

            instanceConnectStory
            .WithScenario("Perform connection to instance")
            .Given("the instance name is", "Instance1", delegate(string instanceName) { instance = instanceRepo.GetInstance(instanceName); })
            .When("the connection is attempted", delegate() { sched = instance.GetQuartzScheduler(); })
            .Then("the connection is not null", delegate() { Assert.IsNotNull(sched); });
        }
 public InstanceController()
 {
     Repository = new QuartzAdmin.web.Models.InstanceRepository();
 }
        public void DoesInstanceConnect()
        {
            QuartzAdmin.web.Models.InstanceRepository instanceRepo = new QuartzAdmin.web.Models.InstanceRepository();
            QuartzAdmin.web.Models.InstanceModel instance = instanceRepo.GetInstance("Instance1");

            try
            {
                Quartz.IScheduler sched = instance.GetQuartzScheduler();
                Assert.IsNotNull(sched);
            }
            catch (Exception ex)
            {
                Assert.Fail("Error connecting", ex);
            }
        }
        public void DoesInstanceConnect2()
        {
            Story instanceConnectStory = new Story("Connect to instance");
            QuartzAdmin.web.Models.InstanceRepository instanceRepo = new QuartzAdmin.web.Models.InstanceRepository();
            QuartzAdmin.web.Models.InstanceModel instance = null;
            Quartz.IScheduler sched = null;

            instanceConnectStory
                .AsA("System Admin")
                .IWant("to connect to a running quartz instance")
                .SoThat("I can perform admin functions");

            instanceConnectStory
                .WithScenario("Perform connection to instance")
                .Given("the instance name is", "Instance1", delegate(string instanceName) { instance = instanceRepo.GetInstance(instanceName); })
                .When("the connection is attempted", delegate() { sched = instance.GetQuartzScheduler(); })
                .Then("the connection is not null", delegate() { Assert.IsNotNull(sched); });




        }
 public JobExecutionController()
 {
     Repository = new QuartzAdmin.web.Models.InstanceRepository();
 }