@@ -688,7 +688,7 @@ public void TestExpansions_Success()
688688 } ;
689689
690690 var createCollectionResult = CreateCollection ( _environmentId , createCollectionRequest ) ;
691- _createdCollectionId = createCollectionResult . CollectionId ;
691+ var expansionCollectionId = createCollectionResult . CollectionId ;
692692
693693 Expansions body = new Expansions ( )
694694 {
@@ -708,9 +708,34 @@ public void TestExpansions_Success()
708708 }
709709 } ;
710710
711- var createExpansionsResult = CreateExpansions ( _environmentId , _createdCollectionId , body ) ;
712- var listExpansionsResult = ListExpansions ( _environmentId , _createdCollectionId ) ;
713- var deleteExpansionResult = DeleteExpansions ( _environmentId , _createdCollectionId ) ;
711+ var createExpansionsResult = CreateExpansions ( _environmentId , expansionCollectionId , body ) ;
712+ var listExpansionsResult = ListExpansions ( _environmentId , expansionCollectionId ) ;
713+ var deleteExpansionResult = DeleteExpansions ( _environmentId , expansionCollectionId ) ;
714+
715+ Assert . IsNotNull ( deleteExpansionResult ) ;
716+ Assert . IsNotNull ( listExpansionsResult ) ;
717+ Assert . IsTrue ( listExpansionsResult . _Expansions [ 0 ] . ExpandedTerms [ 0 ] == "expanded-term" ) ;
718+ Assert . IsTrue ( listExpansionsResult . _Expansions [ 0 ] . InputTerms [ 0 ] == "input-term" ) ;
719+ Assert . IsNotNull ( createExpansionsResult ) ;
720+ Assert . IsTrue ( createExpansionsResult . _Expansions [ 0 ] . ExpandedTerms [ 0 ] == "expanded-term" ) ;
721+ Assert . IsTrue ( createExpansionsResult . _Expansions [ 0 ] . InputTerms [ 0 ] == "input-term" ) ;
722+ }
723+ #endregion
724+
725+ #region Tokenization
726+ [ TestMethod ]
727+ public void TestTokenization_Success ( )
728+ {
729+ CreateCollectionRequest createCollectionRequest = new CreateCollectionRequest ( )
730+ {
731+ Language = CreateCollectionRequest . LanguageEnum . JA ,
732+ Name = _createdCollectionName ,
733+ Description = _createdCollectionDescription ,
734+ ConfigurationId = _createdConfigurationId
735+ } ;
736+
737+ var createCollectionResult = CreateCollection ( _environmentId , createCollectionRequest ) ;
738+ var tokenizationCollectionId = createCollectionResult . CollectionId ;
714739
715740 TokenDict tokenizationDictionary = new TokenDict ( )
716741 {
@@ -734,28 +759,20 @@ public void TestExpansions_Success()
734759
735760 try
736761 {
737- var createTokenizationDictionaryResult = CreateTokenizationDictionary ( _environmentId , _createdCollectionId , tokenizationDictionary ) ;
738- var getTokenizationDictionaryStatusResult = GetTokenizationDictionaryStatus ( _environmentId , _createdCollectionId ) ;
739- var deleteTokenizationDictionary = DeleteTokenizationDictionary ( _environmentId , _createdCollectionId ) ;
762+ var createTokenizationDictionaryResult = CreateTokenizationDictionary ( _environmentId , tokenizationCollectionId , tokenizationDictionary ) ;
763+ var getTokenizationDictionaryStatusResult = GetTokenizationDictionaryStatus ( _environmentId , tokenizationCollectionId ) ;
764+ var deleteTokenizationDictionary = DeleteTokenizationDictionary ( _environmentId , tokenizationCollectionId ) ;
740765
741766 Assert . IsNotNull ( deleteTokenizationDictionary ) ;
742767 Assert . IsNotNull ( getTokenizationDictionaryStatusResult ) ;
743768 Assert . IsTrue ( getTokenizationDictionaryStatusResult . Status == TokenDictStatusResponse . StatusEnum . PENDING ) ;
744769 Assert . IsNotNull ( createTokenizationDictionaryResult ) ;
745770 Assert . IsTrue ( createTokenizationDictionaryResult . Status == TokenDictStatusResponse . StatusEnum . PENDING ) ;
746771 }
747- catch ( Exception e )
772+ catch ( Exception e )
748773 {
749774 Console . WriteLine ( e . Message ) ;
750775 }
751-
752- Assert . IsNotNull ( deleteExpansionResult ) ;
753- Assert . IsNotNull ( listExpansionsResult ) ;
754- Assert . IsTrue ( listExpansionsResult . _Expansions [ 0 ] . ExpandedTerms [ 0 ] == "expanded-term" ) ;
755- Assert . IsTrue ( listExpansionsResult . _Expansions [ 0 ] . InputTerms [ 0 ] == "input-term" ) ;
756- Assert . IsNotNull ( createExpansionsResult ) ;
757- Assert . IsTrue ( createExpansionsResult . _Expansions [ 0 ] . ExpandedTerms [ 0 ] == "expanded-term" ) ;
758- Assert . IsTrue ( createExpansionsResult . _Expansions [ 0 ] . InputTerms [ 0 ] == "input-term" ) ;
759776 }
760777 #endregion
761778
0 commit comments