public void PostGetDeleteGetMonthlyTask_Standard_TaskDoesNotExistAnymore(
            [ValueSource("GetDifferentSaopClients")] ISyncReplyClient client)
        {
            var id = 1;

            var postRequest = new PostMonthlyTask{MonthlyTaskRequest =TaskHelper.CreateMonthlyTaskRequest()};
            var resultId = client.PostMonthlyTask(postRequest);
            var getRequest = new GetMonthlyTask { Id = resultId.TaskResponse.Id };
            var result = client.GetMonthlyTask(getRequest);

            Assert.That(resultId.TaskResponse.Id, Is.EqualTo(id));
            AssertSame.MonthlyTaskRequest(result.MonthlyTaskRequest, postRequest.MonthlyTaskRequest);

            client.DeleteMonthlyTask(new DeleteMonthlyTask { Id = resultId.TaskResponse.Id });
            result = client.GetMonthlyTask(getRequest);

            Assert.That(result.ResponseStatus.ErrorCode, Is.EqualTo("ArgumentNullException"));
        }
        public void PostGetPutGetMonthlyTask_Standard_ReturnTwiceTheSameIdAndObject(
            [ValueSource("GetDifferentSaopClients")] ISyncReplyClient client)
        {
            var id = 1;

            var postRequest = new PostMonthlyTask{MonthlyTaskRequest = TaskHelper.CreateMonthlyTaskRequest()};
            var resultId = client.PostMonthlyTask(postRequest);
            var getRequest = new GetMonthlyTask { Id = resultId.TaskResponse.Id };
            var result = client.GetMonthlyTask(getRequest);

            Assert.That(resultId.TaskResponse.Id, Is.EqualTo(id));
            AssertSame.MonthlyTaskRequest(result.MonthlyTaskRequest, postRequest.MonthlyTaskRequest);

            var putRequest = new PutMonthlyTask {MonthlyTaskRequest = postRequest.MonthlyTaskRequest};
            putRequest.MonthlyTaskRequest.Id = resultId.TaskResponse.Id;
            putRequest.MonthlyTaskRequest.Name = "dummy";
            putRequest.MonthlyTaskRequest.Description = "hm..";
            putRequest.MonthlyTaskRequest.RecursOnMonth = new HashSet<EMonth>{EMonth.April};
            var responsePut = client.PutMonthlyTask(putRequest);
            result = client.GetMonthlyTask(getRequest);

            Assert.That(resultId.TaskResponse.Id, Is.EqualTo(id));
            AssertSame.MonthlyTaskRequest(result.MonthlyTaskRequest, putRequest.MonthlyTaskRequest);
        }
 public GetMonthlyTaskResponse Any(GetMonthlyTask request)
 {
     var req = new MonthlyTaskRequest { Id = request.Id };
     var result = taskHandler.Get(req);
     return new GetMonthlyTaskResponse { MonthlyTaskRequest = result };
 }