public void ResourcesDictionaryUpdatePostTest() { EntriesListResponse entriesListResponse = new EntriesListResponse(); DictionaryUpdateBody dictionaryUpdateBody = new DictionaryUpdateBody(); DictionaryUpdateInput dictionaryUpdateInput = new DictionaryUpdateInput(); dictionaryUpdateInput.Comments = "This dictionary has been created and updated for csharp client testing purposes"; dictionaryUpdateBody.Dictionary = dictionaryUpdateInput; DictionaryUpdateResponse dictionaryUpdateResponse = new DictionaryUpdateResponse(); dictionaryUpdateResponse = dictionaryApi.ResourcesDictionaryUpdatePost(dictionaryId, dictionaryUpdateBody); Assert.IsNotNull(dictionaryUpdateResponse.Updated); }
public void ResourcesDictionaryEntryListPostTest() { EntriesListFilters entriesListFilters = new EntriesListFilters(); EntriesListResponse entriesListResponse = new EntriesListResponse(); entriesListResponse = dictionaryApi.ResourcesDictionaryEntryListPost(dictionaryId, entriesListFilters); Assert.IsNotNull(entriesListResponse.TotalNoLimit); }
public void ResourcesDictionaryEntryUpdatePostTest() { EntriesListFilters entriesListFilters = new EntriesListFilters(); EntriesListResponse entriesListResponse = new EntriesListResponse(); entriesListResponse = dictionaryApi.ResourcesDictionaryEntryListPost(dictionaryId, entriesListFilters); EntryUpdateBody entryUpdateBody = new EntryUpdateBody(); EntryUpdateInput entryUpdateInput = new EntryUpdateInput(); EntryUpdateResponse entryUpdateResponse = new EntryUpdateResponse(); entryUpdateBody.SourceId = entriesListResponse.Entries[0].SourceId; entryUpdateBody.TargetId = entriesListResponse.Entries[0].TargetId; entryUpdateInput.Priority = ""; entryUpdateInput.Type = ""; entryUpdateInput.SourcePos = ""; entryUpdateInput.TargetPos = ""; entryUpdateInput.Source = "example"; entryUpdateInput.Target = "exemple"; entryUpdateInput.TargetLang = "fr"; entryUpdateInput.SourceLang = "en"; entryUpdateBody.Update = entryUpdateInput; entryUpdateResponse = dictionaryApi.ResourcesDictionaryEntryUpdatePost(dictionaryId, entryUpdateBody); Assert.IsNotNull(entryUpdateResponse.TargetId); }
public void ResourcesDictionaryEntryDeletePostTest() { EntriesListResponse entriesListResponse = new EntriesListResponse(); EntriesListFilters entriesListFilters = new EntriesListFilters(); entriesListResponse = dictionaryApi.ResourcesDictionaryEntryListPost(dictionaryId, entriesListFilters); EntryDeleteBody entryDeleteBody = new EntryDeleteBody(); EntryDeleteInput entryDeleteInput = new EntryDeleteInput(); entryDeleteInput.SourceId = entriesListResponse.Entries[0].SourceId; entryDeleteInput.TargetId = entriesListResponse.Entries[0].TargetId; entryDeleteBody.Entry = entryDeleteInput; EntryDeleteResponse entryDeleteResponse = new EntryDeleteResponse(); entryDeleteResponse = dictionaryApi.ResourcesDictionaryEntryDeletePost(dictionaryId, entryDeleteBody); Assert.IsNotNull(entryDeleteResponse.Status); }