public async Task AddTermForConceptWithCustomFields(string termbaseId) { var groupShareClient = Helper.GsClient; var conceptId = await CreateConceptWithCustomFields(termbaseId, "NewEntry"); var conceptRequest = new ConceptResponse(termbaseId, conceptId); var conceptResponse = await groupShareClient.Terminology.GetConcept(conceptRequest); var newTerm = new TermbaseTerms { Attributes = null, Transactions = new List <Transactions> { new Transactions { DateTime = DateTime.Now, Id = null, Username = "", Details = new TransactionsDetails { User = "", Type = "Create" } } }, Text = "Added term with custom fields" }; conceptResponse.Concept.Languages[0].Terms.Add(newTerm); var updatedResponse = await groupShareClient.Terminology.EditConcept(termbaseId, conceptResponse); await DeleteConcept(termbaseId, conceptId); }
public async Task AddTermForConceptWithCustomFields() { var groupShareClient = Helper.GsClient; var conceptId = await CreateConceptWithCustomFields(Helper.TermbaseId, "TestEntry"); var conceptRequest = new ConceptResponse(Helper.TermbaseId, conceptId); var conceptResponse = await groupShareClient.Terminology.GetConcept(conceptRequest); var newTerm = new TermbaseTerms { Attributes = null, Transactions = new List <Transactions> { new Transactions { DateTime = DateTime.Now, Id = null, Username = "", Details = new TransactionsDetails { User = "", Type = "Create" } } }, Text = "Added term with custom fields" }; conceptResponse.Concept.Languages[0].Terms.Add(newTerm); var updatedResponse = await groupShareClient.Terminology.EditConcept(Helper.TermbaseId, conceptResponse); var query = "Added term with custom fields"; var language = conceptResponse.Concept.Languages[0].Language.Id; var request = new SearchTermRequest(Helper.TermbaseId, language, query); var searchedResponse = await groupShareClient.Terminology.SearchTerm(request); var searchedWord = searchedResponse.Terms.Where(s => s.TermText == query); Assert.True(searchedWord != null); await DeleteConcept(Helper.TermbaseId, conceptId); }
public async Task SearchTerm() { var groupShareClient = Helper.GsClient; var conceptId = await CreateConcept(Helper.TermbaseId, "NewEntry"); var conceptRequest = new ConceptResponse(Helper.TermbaseId, conceptId); var conceptResponse = await groupShareClient.Terminology.GetConcept(conceptRequest); var newTerm = new TermbaseTerms { Attributes = null, Transactions = new List <Transactions> { new Transactions { DateTime = DateTime.Now, Id = null, Username = "", Details = new TransactionsDetails { User = "", Type = "Create" } } }, Text = "gsKitTest" }; conceptResponse.Concept.Languages[0].Terms.Add(newTerm); var language = conceptResponse.Concept.Languages[0].Language.Id; var request = new SearchTermRequest(Helper.TermbaseId, language, "gsKitTest"); var searchedResponse = await groupShareClient.Terminology.SearchTerm(request); var searchedWord = searchedResponse.Terms.Where(s => s.TermText == "gsKitTest"); Assert.True(searchedWord != null); await DeleteConcept(Helper.TermbaseId, conceptId); }