@@ -97,6 +97,7 @@ public class ExampleAssistant : MonoBehaviour
97
97
private bool _createEntityTested = false ;
98
98
private bool _getEntityTested = false ;
99
99
private bool _updateEntityTested = false ;
100
+ private bool _listMentionsTested = false ;
100
101
private bool _listValuesTested = false ;
101
102
private bool _createValueTested = false ;
102
103
private bool _getValueTested = false ;
@@ -189,8 +190,8 @@ private IEnumerator Examples()
189
190
// Update Workspace
190
191
UpdateWorkspace updateWorkspace = new UpdateWorkspace ( )
191
192
{
192
- Name = _createdWorkspaceName + "-updated " ,
193
- Description = _createdWorkspaceDescription + "-updated " ,
193
+ Name = _createdWorkspaceName + "Updated " ,
194
+ Description = _createdWorkspaceDescription + "Updated " ,
194
195
Language = _createdWorkspaceLanguage
195
196
} ;
196
197
_service . UpdateWorkspace ( OnUpdateWorkspace , OnFail , _createdWorkspaceId , updateWorkspace ) ;
@@ -259,8 +260,8 @@ private IEnumerator Examples()
259
260
while ( ! _getIntentTested )
260
261
yield return null ;
261
262
// Update Intents
262
- string updatedIntent = _createdIntent + "-updated " ;
263
- string updatedIntentDescription = _createdIntentDescription + "-updated " ;
263
+ string updatedIntent = _createdIntent + "Updated " ;
264
+ string updatedIntentDescription = _createdIntentDescription + "Updated " ;
264
265
UpdateIntent updateIntent = new UpdateIntent ( )
265
266
{
266
267
Intent = updatedIntent ,
@@ -287,7 +288,7 @@ private IEnumerator Examples()
287
288
while ( ! _getExampleTested )
288
289
yield return null ;
289
290
// Update Examples
290
- string updatedExample = _createdExample + "-updated " ;
291
+ string updatedExample = _createdExample + "Updated " ;
291
292
UpdateExample updateExample = new UpdateExample ( )
292
293
{
293
294
Text = updatedExample
@@ -314,8 +315,8 @@ private IEnumerator Examples()
314
315
while ( ! _getEntityTested )
315
316
yield return null ;
316
317
// Update Entities
317
- string updatedEntity = _createdEntity + "-updated " ;
318
- string updatedEntityDescription = _createdEntityDescription + "-updated " ;
318
+ string updatedEntity = _createdEntity + "Updated " ;
319
+ string updatedEntityDescription = _createdEntityDescription + "Updated " ;
319
320
UpdateEntity updateEntity = new UpdateEntity ( )
320
321
{
321
322
Entity = updatedEntity ,
@@ -325,6 +326,11 @@ private IEnumerator Examples()
325
326
while ( ! _updateEntityTested )
326
327
yield return null ;
327
328
329
+ // List Mentinos
330
+ _service . ListMentions ( OnListMentions , OnFail , _createdWorkspaceId , updatedEntity ) ;
331
+ while ( ! _listMentionsTested )
332
+ yield return null ;
333
+
328
334
// List Values
329
335
_service . ListValues ( OnListValues , OnFail , _createdWorkspaceId , updatedEntity ) ;
330
336
while ( ! _listValuesTested )
@@ -342,7 +348,7 @@ private IEnumerator Examples()
342
348
while ( ! _getValueTested )
343
349
yield return null ;
344
350
// Update Values
345
- string updatedValue = _createdValue + "-updated " ;
351
+ string updatedValue = _createdValue + "Updated " ;
346
352
UpdateValue updateValue = new UpdateValue ( )
347
353
{
348
354
Value = updatedValue
@@ -368,7 +374,7 @@ private IEnumerator Examples()
368
374
while ( ! _getSynonymTested )
369
375
yield return null ;
370
376
// Update Synonyms
371
- string updatedSynonym = _createdSynonym + "-updated " ;
377
+ string updatedSynonym = _createdSynonym + "Updated " ;
372
378
UpdateSynonym updateSynonym = new UpdateSynonym ( )
373
379
{
374
380
Synonym = updatedSynonym
@@ -395,8 +401,8 @@ private IEnumerator Examples()
395
401
while ( ! _getDialogNodeTested )
396
402
yield return null ;
397
403
// Update Dialog Nodes
398
- string updatedDialogNodeName = _dialogNodeName + "_updated " ;
399
- string updatedDialogNodeDescription = _dialogNodeDesc + "_updated " ;
404
+ string updatedDialogNodeName = _dialogNodeName + "Updated " ;
405
+ string updatedDialogNodeDescription = _dialogNodeDesc + "Updated " ;
400
406
UpdateDialogNode updateDialogNode = new UpdateDialogNode ( )
401
407
{
402
408
DialogNode = updatedDialogNodeName ,
@@ -433,7 +439,7 @@ private IEnumerator Examples()
433
439
while ( ! _getCounterexampleTested )
434
440
yield return null ;
435
441
// Update Counterexamples
436
- string updatedCounterExampleText = _createdCounterExampleText + "-updated " ;
442
+ string updatedCounterExampleText = _createdCounterExampleText + "Updated " ;
437
443
UpdateCounterexample updateCounterExample = new UpdateCounterexample ( )
438
444
{
439
445
Text = updatedCounterExampleText
@@ -480,6 +486,12 @@ private IEnumerator Examples()
480
486
yield break ;
481
487
}
482
488
489
+ private void OnListMentions ( EntityMentionCollection response , Dictionary < string , object > customData )
490
+ {
491
+ Log . Debug ( "ExampleAssistant.OnListMentions()" , "Response: {0}" , customData [ "json" ] . ToString ( ) ) ;
492
+ _listMentionsTested = true ;
493
+ }
494
+
483
495
private void OnDeleteWorkspace ( object response , Dictionary < string , object > customData )
484
496
{
485
497
Log . Debug ( "ExampleAssistant.OnDeleteWorkspace()" , "Response: {0}" , customData [ "json" ] . ToString ( ) ) ;
@@ -769,6 +781,13 @@ private void OnCreateWorkspace(Workspace response, Dictionary<string, object> cu
769
781
private void OnListWorkspaces ( WorkspaceCollection response , Dictionary < string , object > customData )
770
782
{
771
783
Log . Debug ( "ExampleAssistant.OnListWorkspaces()" , "Response: {0}" , customData [ "json" ] . ToString ( ) ) ;
784
+
785
+ foreach ( Workspace workspace in response . Workspaces )
786
+ {
787
+ if ( workspace . Name . Contains ( "unity" ) )
788
+ _service . DeleteWorkspace ( OnDeleteWorkspace , OnFail , workspace . WorkspaceId ) ;
789
+ }
790
+
772
791
_listWorkspacesTested = true ;
773
792
}
774
793
0 commit comments