Example #1
0
 public static void MonthlyTaskRequest(MonthlyTaskRequest result, MonthlyTaskRequest task)
 {
     AssertSameBasicTaskProperties(result, task);
     AssertSameRecurringTaskProperties(result, task);
     Assert.That(result.RecursOnDayOfMonth, Is.EqualTo(task.RecursOnDayOfMonth));
     Assert.That(result.RecursOnMonth, Is.EqualTo(task.RecursOnMonth));
     Assert.That(result.RecursOnSpecialDayOfMonth, Is.EqualTo(task.RecursOnSpecialDayOfMonth));
 }
Example #2
0
 public static MonthlyTaskRequest CreateMonthlyTaskRequest()
 {
     var task = new MonthlyTaskRequest();
     InitRecurringTaskProperties(task);
     task.RecursOnDayOfMonth = new HashSet<EDayOfMonth> { EDayOfMonth.D1, EDayOfMonth.D15 };
     task.RecursOnMonth = new HashSet<EMonth> { EMonth.March, EMonth.July };
     task.RecursOnSpecialDayOfMonth = new Dictionary<EMonthlyOn, IList<DayOfWeek>> { { EMonthlyOn.First, new List<DayOfWeek> { DayOfWeek.Tuesday } } };
     return task;
 }
 public TaskResponse Post(MonthlyTaskRequest request)
 {
     return ReturnCreated(taskHandler.Create(request), Global.MONTHLY);
 }
 public MonthlyTaskRequest Get(MonthlyTaskRequest request)
 {
     return taskHandler.Get(request);
 }
 public TaskResponse Delete(MonthlyTaskRequest request)
 {
     return taskHandler.Delete(request);
 }
 public TaskResponse Put(MonthlyTaskRequest request)
 {
     return taskHandler.Update(request);
 }
 public GetMonthlyTaskResponse Any(GetMonthlyTask request)
 {
     var req = new MonthlyTaskRequest { Id = request.Id };
     var result = taskHandler.Get(req);
     return new GetMonthlyTaskResponse { MonthlyTaskRequest = result };
 }