BlueCollar.Test.RepositoryTests.DeleteSchedule C# (CSharp) Method

DeleteSchedule() protected method

Delete schedule tests.
protected DeleteSchedule ( ) : void
return void
        protected void DeleteSchedule()
        {
            if (this.Repository != null)
            {
                ScheduleRecord scheduleRecord = new ScheduleRecord()
                {
                    ApplicationName = BlueCollarSection.Section.ApplicationName,
                    Name = "Test",
                    RepeatType = ScheduleRepeatType.Days,
                    RepeatValue = 1,
                    StartOn = DateTime.UtcNow.FloorWithSeconds()
                };

                this.Repository.CreateSchedule(scheduleRecord, null);
                this.Repository.DeleteSchedule(scheduleRecord.Id.Value, null);

                Assert.IsNull(this.Repository.GetScheduledJobList(BlueCollarSection.Section.ApplicationName, scheduleRecord.Id.Value, null, 1, 0, null).Id);
            }
        }