Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Scripts/Services/Assistant/V2/Model/RuntimeResponseGeneric.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,6 @@ public class PreferenceValue
[JsonProperty("agent_unavailable", NullValueHandling = NullValueHandling.Ignore)]
public AgentAvailabilityMessage AgentUnavailable { get; protected set; }
/// <summary>
/// Routing or other contextual information to be used by target service desk systems.
/// </summary>
[JsonProperty("transfer_info", NullValueHandling = NullValueHandling.Ignore)]
public DialogNodeOutputConnectToAgentTransferInfo TransferInfo { get; protected set; }
/// <summary>
/// A label identifying the topic of the conversation, derived from the **title** property of the relevant node
/// or the **topic** property of the dialog node response.
/// </summary>
Expand Down
45 changes: 45 additions & 0 deletions Tests/AssistantV2IntegrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,34 @@ public IEnumerator TestListLogs()
[UnityTest, Order(2)]
public IEnumerator TestRuntimeResponseGenericRuntimeResponseTypeChannelTransfer()
{
service = new AssistantService(versionDate);

while (!service.Authenticator.CanAuthenticate())
yield return null;

assistantId = Environment.GetEnvironmentVariable("ASSISTANT_ASSISTANT_ID");

string sessionId = null;

SessionResponse createSessionResponse = null;
Log.Debug("AssistantV2IntegrationTests", "Attempting to CreateSession...");
service.WithHeader("X-Watson-Test", "1");
service.CreateSession(
callback: (DetailedResponse<SessionResponse> response, IBMError error) =>
{
Log.Debug("AssistantV2IntegrationTests", "result: {0}", response.Response);
createSessionResponse = response.Result;
sessionId = createSessionResponse.SessionId;
Assert.IsNotNull(createSessionResponse);
Assert.IsNotNull(response.Result.SessionId);
Assert.IsNull(error);
},
assistantId: assistantId
);

while (createSessionResponse == null)
yield return null;

MessageResponseStateless messageResponse = null;
Comment on lines +329 to 331
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also need to delete the session, something like this is needed at the end of the test

object deleteSessionResponse = null;
            Log.Debug("AssistantV2IntegrationTests", "Attempting to DeleteSession...");
            service.WithHeader("X-Watson-Test", "1");
            service.DeleteSession(
                callback: (DetailedResponse<object> response, IBMError error) =>
                {
                    Log.Debug("AssistantV2IntegrationTests", "result: {0}", response.Response);
                    deleteSessionResponse = response.Result;
                    Assert.IsNotNull(response.Result);
                    Assert.IsNull(error);
                },
                assistantId: assistantId,
                sessionId: sessionId
            );

            while (deleteSessionResponse == null)
                yield return null;

string conversationId = null;

Expand Down Expand Up @@ -331,6 +358,24 @@ public IEnumerator TestRuntimeResponseGenericRuntimeResponseTypeChannelTransfer(

while (messageResponse == null)
yield return null;

object deleteSessionResponse = null;
Log.Debug("AssistantV2IntegrationTests", "Attempting to DeleteSession...");
service.WithHeader("X-Watson-Test", "1");
service.DeleteSession(
callback: (DetailedResponse<object> response, IBMError error) =>
{
Log.Debug("AssistantV2IntegrationTests", "result: {0}", response.Response);
deleteSessionResponse = response.Result;
Assert.IsNotNull(response.Result);
Assert.IsNull(error);
},
assistantId: assistantId,
sessionId: sessionId
);

while (deleteSessionResponse == null)
yield return null;
}

[TearDown]
Expand Down