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

            var postRequest = new PostOneTimeTask{OneTimeTaskRequest = TaskHelper.CreateOneTimeTaskRequest()};
            var resultId = client.PostOneTimeTask(postRequest);
            var getRequest = new GetOneTimeTask { Id = resultId.TaskResponse.Id };
            var result = client.GetOneTimeTask(getRequest);

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

            client.DeleteOneTimeTask(new DeleteOneTimeTask { Id = resultId.TaskResponse.Id });
            result = client.GetOneTimeTask(getRequest);

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

            var postRequest = new PostOneTimeTask{OneTimeTaskRequest = TaskHelper.CreateOneTimeTaskRequest()};
            var resultId = client.PostOneTimeTask(postRequest);
            var getRequest = new GetOneTimeTask { Id = resultId.TaskResponse.Id };
            var result = client.GetOneTimeTask(getRequest);

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

            var putRequest = new PutOneTimeTask{OneTimeTaskRequest = postRequest.OneTimeTaskRequest};
            putRequest.OneTimeTaskRequest.Id = resultId.TaskResponse.Id;
            putRequest.OneTimeTaskRequest.Name = "dummy";
            putRequest.OneTimeTaskRequest.Description = "hm..";
            putRequest.OneTimeTaskRequest.Trigger = DateTime.Now.AddDays(123);
            var responsePut = client.PutOneTimeTask(putRequest);
            result = client.GetOneTimeTask(getRequest);

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