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

            var postRequest = new PostWeeklyTask{WeeklyTaskRequest = TaskHelper.CreateWeaklyTaskRequest()};
            var resultId = client.PostWeeklyTask(postRequest);
            var getRequest = new GetWeeklyTask { Id = resultId.TaskResponse.Id };
            var result = client.GetWeeklyTask(getRequest);

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

            var putRequest = new PutWeeklyTask{WeeklyTaskRequest = postRequest.WeeklyTaskRequest};
            putRequest.WeeklyTaskRequest.Id = resultId.TaskResponse.Id;
            putRequest.WeeklyTaskRequest.Name = "dummy";
            putRequest.WeeklyTaskRequest.Description = "hm..";
            putRequest.WeeklyTaskRequest.RecursEveryXWeeks = 784;
            var responsePut = client.PutWeeklyTask(putRequest);
            result = client.GetWeeklyTask(getRequest);

            Assert.That(resultId.TaskResponse.Id, Is.EqualTo(id));
            AssertSame.WeeklyTaskRequest(result.WeeklyTaskRequest, putRequest.WeeklyTaskRequest);
        }
        public void PostGetDeleteGetWeeklyTask_Standard_TaskDoesNotExistAnymore(
            [ValueSource("GetDifferentSaopClients")] ISyncReplyClient client)
        {
            var id = 1;

            var postRequest =new PostWeeklyTask{WeeklyTaskRequest=TaskHelper.CreateWeaklyTaskRequest()};
            var resultId = client.PostWeeklyTask(postRequest);
            var getRequest = new GetWeeklyTask { Id = resultId.TaskResponse.Id };
            var result = client.GetWeeklyTask(getRequest);

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

            client.DeleteWeeklyTask(new DeleteWeeklyTask { Id = resultId.TaskResponse.Id });
            result = client.GetWeeklyTask(getRequest);

            Assert.That(result.ResponseStatus.ErrorCode, Is.EqualTo("ArgumentNullException"));
        }
 public GetWeeklyTaskResponse Any(GetWeeklyTask request)
 {
     var req = new WeeklyTaskRequest { Id = request.Id };
     var result = taskHandler.Get(req);
     return new GetWeeklyTaskResponse { WeeklyTaskRequest = result };
 }