@@ -557,7 +557,9 @@ public IEnumerator TestAddCustomPrompts()
557
557
} ;
558
558
559
559
MemoryStream file = new MemoryStream ( ) ;
560
+ FileStream fs = File . OpenRead ( wavFilePath ) ;
560
561
562
+ fs . CopyTo ( file ) ;
561
563
Prompt prompt = null ;
562
564
563
565
service . AddCustomPrompt (
@@ -624,25 +626,49 @@ public IEnumerator TestGetCustomPrompts()
624
626
} ;
625
627
626
628
MemoryStream file = new MemoryStream ( ) ;
629
+ FileStream fs = File . OpenRead ( wavFilePath ) ;
627
630
631
+ fs . CopyTo ( file ) ;
632
+ string promptId = "" ;
628
633
Prompt prompt = null ;
629
634
630
- service . GetCustomPrompt (
635
+ service . AddCustomPrompt (
631
636
callback : ( DetailedResponse < Prompt > response , IBMError error ) =>
632
637
{
633
- Log . Debug ( "TextToSpeechServiceV1IntegrationTests" , "GetCustomPrompt result: {0}" , response . Response ) ;
638
+ Log . Debug ( "TextToSpeechServiceV1IntegrationTests" , "AddCustomPrompt result: {0}" , response . Response ) ;
634
639
prompt = response . Result ;
635
640
Assert . IsNotNull ( prompt ) ;
636
641
Assert . IsNotNull ( prompt . Status ) ;
637
642
Assert . IsNull ( error ) ;
643
+ promptId = prompt . PromptId ;
638
644
} ,
639
645
customizationId : customizationId ,
640
- promptId : "testId"
646
+ promptId : "testId" ,
647
+ metadata : promptMetadata ,
648
+ file : file
641
649
) ;
642
650
643
651
while ( prompt == null )
644
652
yield return null ;
645
653
654
+ Prompt getPrompt = null ;
655
+
656
+ service . GetCustomPrompt (
657
+ callback : ( DetailedResponse < Prompt > response , IBMError error ) =>
658
+ {
659
+ Log . Debug ( "TextToSpeechServiceV1IntegrationTests" , "GetCustomPrompt result: {0}" , response . Response ) ;
660
+ getPrompt = response . Result ;
661
+ Assert . IsNotNull ( getPrompt ) ;
662
+ Assert . IsNotNull ( getPrompt . Status ) ;
663
+ Assert . IsNull ( error ) ;
664
+ } ,
665
+ customizationId : customizationId ,
666
+ promptId : promptId
667
+ ) ;
668
+
669
+ while ( getPrompt == null )
670
+ yield return null ;
671
+
646
672
bool isComplete = false ;
647
673
service . DeleteCustomModel (
648
674
callback : ( DetailedResponse < object > response , IBMError error ) =>
@@ -689,6 +715,9 @@ public IEnumerator TestDeleteCustomPrompts()
689
715
} ;
690
716
691
717
MemoryStream file = new MemoryStream ( ) ;
718
+ FileStream fs = File . OpenRead ( wavFilePath ) ;
719
+
720
+ fs . CopyTo ( file ) ;
692
721
693
722
Prompt prompt = null ;
694
723
0 commit comments