@@ -300,7 +300,34 @@ public IEnumerator TestListLogs()
300300 [ UnityTest , Order ( 2 ) ]
301301 public IEnumerator TestRuntimeResponseGenericRuntimeResponseTypeChannelTransfer ( )
302302 {
303+ service = new AssistantService ( versionDate ) ;
304+
305+ while ( ! service . Authenticator . CanAuthenticate ( ) )
306+ yield return null ;
307+
303308 assistantId = Environment . GetEnvironmentVariable ( "ASSISTANT_ASSISTANT_ID" ) ;
309+
310+ string sessionId = null ;
311+
312+ SessionResponse createSessionResponse = null ;
313+ Log . Debug ( "AssistantV2IntegrationTests" , "Attempting to CreateSession..." ) ;
314+ service . WithHeader ( "X-Watson-Test" , "1" ) ;
315+ service . CreateSession (
316+ callback : ( DetailedResponse < SessionResponse > response , IBMError error ) =>
317+ {
318+ Log . Debug ( "AssistantV2IntegrationTests" , "result: {0}" , response . Response ) ;
319+ createSessionResponse = response . Result ;
320+ sessionId = createSessionResponse . SessionId ;
321+ Assert . IsNotNull ( createSessionResponse ) ;
322+ Assert . IsNotNull ( response . Result . SessionId ) ;
323+ Assert . IsNull ( error ) ;
324+ } ,
325+ assistantId : assistantId
326+ ) ;
327+
328+ while ( createSessionResponse == null )
329+ yield return null ;
330+
304331 MessageResponseStateless messageResponse = null ;
305332 string conversationId = null ;
306333
@@ -331,6 +358,24 @@ public IEnumerator TestRuntimeResponseGenericRuntimeResponseTypeChannelTransfer(
331358
332359 while ( messageResponse == null )
333360 yield return null ;
361+
362+ object deleteSessionResponse = null ;
363+ Log . Debug ( "AssistantV2IntegrationTests" , "Attempting to DeleteSession..." ) ;
364+ service . WithHeader ( "X-Watson-Test" , "1" ) ;
365+ service . DeleteSession (
366+ callback : ( DetailedResponse < object > response , IBMError error ) =>
367+ {
368+ Log . Debug ( "AssistantV2IntegrationTests" , "result: {0}" , response . Response ) ;
369+ deleteSessionResponse = response . Result ;
370+ Assert . IsNotNull ( response . Result ) ;
371+ Assert . IsNull ( error ) ;
372+ } ,
373+ assistantId : assistantId ,
374+ sessionId : sessionId
375+ ) ;
376+
377+ while ( deleteSessionResponse == null )
378+ yield return null ;
334379 }
335380
336381 [ TearDown ]
0 commit comments