File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
assistant/src/test/java/com/ibm/watson/assistant/v1 Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 2828import io .reactivex .Single ;
2929import io .reactivex .functions .Consumer ;
3030import io .reactivex .schedulers .Schedulers ;
31+
32+ import java .awt .*;
3133import java .text .DateFormat ;
3234import java .text .SimpleDateFormat ;
3335import java .util .ArrayList ;
36+ import java .util .Arrays ;
3437import java .util .Date ;
3538import java .util .HashMap ;
3639import java .util .List ;
@@ -1868,6 +1871,25 @@ public void testListMentions() {
18681871 assertNotNull (collection );
18691872 }
18701873
1874+ @ Test
1875+ public void testRuntimeResponseGeneric () {
1876+ try {
1877+ ArrayList <String >inputStrings = new ArrayList <>(Arrays .asList ("audio" , "iframe" , "video" ));
1878+ for (String inputMessage : inputStrings ) {
1879+ MessageInput input = new MessageInput ();
1880+ input .setText (inputMessage );
1881+
1882+ MessageOptions options = new MessageOptions .Builder (workspaceId ).input (input ).build ();
1883+ MessageResponse response = service .message (options ).execute ().getResult ();
1884+
1885+ assertNotNull (response );
1886+ assertTrue (response .getOutput ().getGeneric ().get (0 ).responseType ().contains (inputMessage ));
1887+ }
1888+ } catch (Exception ex ) {
1889+ fail (ex .getMessage ());
1890+ }
1891+ }
1892+
18711893 /** Test bulk classify */
18721894 @ Ignore
18731895 @ Test
You can’t perform that action at this time.
0 commit comments