public void ResourcesCorpusSegmentUpdatePostTest()
        {
            CorpusSegmentListResponse corpusSegmentListResponse = new CorpusSegmentListResponse();
            corpusSegmentListResponse = corpusApi.ResourcesCorpusSegmentListGet(corpusId, null, null, null);

            CorpusSegmentUpdateResponse corpusSegmentUpdateResponse = new CorpusSegmentUpdateResponse();
            corpusSegmentUpdateResponse = corpusApi.ResourcesCorpusSegmentUpdatePost(corpusId, corpusSegmentListResponse.Segments[0].Id, "source",null, null, null, null);
            Assert.IsNotNull(corpusSegmentUpdateResponse.Updated);
        }
 public void ResourcesCorpusSegmentListGetTest()
 {
     CorpusSegmentListResponse corpusSegmentListResponse = new CorpusSegmentListResponse();
     corpusSegmentListResponse = corpusApi.ResourcesCorpusSegmentListGet(corpusId, null, null, null);
     Assert.IsNotNull(corpusSegmentListResponse.Segments);
 }
        public void ResourcesCorpusSegmentTargetAddPostTest()
        {
            CorpusSegmentListResponse corpusSegmentListResponse = new CorpusSegmentListResponse();
            corpusSegmentListResponse = corpusApi.ResourcesCorpusSegmentListGet(corpusId, null, null, null);

            CorpusSegmentAddTargetRequest corpusSegmentAddTargetRequest = new CorpusSegmentAddTargetRequest();
            CorpusSegmentAddTargetResponse corpusSegmentAddTargetResponse = new CorpusSegmentAddTargetResponse();
            corpusSegmentAddTargetRequest.CorpusId = corpusId;
            corpusSegmentAddTargetRequest.SegId = segmentId;
            CorpusAddSegmentTarget corpusAddSegmentTarget = new CorpusAddSegmentTarget();
            corpusAddSegmentTarget.Lang = "fr";
            corpusAddSegmentTarget.Target = "nouveau segment cible";
            List<CorpusAddSegmentTarget> segList = new List<CorpusAddSegmentTarget>();
            segList.Add(corpusAddSegmentTarget);
            corpusSegmentAddTargetRequest.Targets = segList;
            corpusSegmentAddTargetRequest.SegId = corpusSegmentListResponse.Segments[0].Id;
            corpusSegmentAddTargetResponse = corpusApi.ResourcesCorpusSegmentTargetAddPost(corpusSegmentAddTargetRequest, null);
            Assert.IsNotNull(corpusSegmentAddTargetResponse.Added);
        }
 public void ResourcesCorpusSegmentDeletePostAsyncTest()
 {
     CorpusSegmentDeleteResponse corpusSegmentDeleteResponse = new CorpusSegmentDeleteResponse();
     CorpusSegmentListResponse corpusSegmentListResponse = new CorpusSegmentListResponse();
     corpusSegmentListResponse = corpusApi.ResourcesCorpusSegmentListGet(corpusId, null, null, null);
     List<string> segments = new List<string>();
     segmentId = corpusSegmentListResponse.Segments[0].Id;
     segments.Add(corpusSegmentListResponse.Segments[0].Id); Task.Run(async () =>
     {
         corpusSegmentDeleteResponse = await corpusApi.ResourcesCorpusSegmentDeletePostAsync(corpusId, segments, null);
     }).Wait();
     Assert.IsNotNull(corpusSegmentDeleteResponse.NbDeleted);
 }