@@ -13,11 +13,39 @@ namespace Azure.Communication.CallAutomation.Tests.CallDialogs
1313 public class CallDialogTests : CallAutomationTestBase
1414 {
1515 private const string dialogId = "92e08834-b6ee-4ede-8956-9fefa27a691c" ;
16+ private static readonly Dictionary < string , object > dialogContextWithObject = new Dictionary < string , object > ( )
17+ {
18+ {
19+ "context" ,
20+ new
21+ {
22+ contextName = "name" ,
23+ secondProperty = 1
24+ }
25+ }
26+ } ;
27+ private static readonly Dictionary < string , object > dialogContextWithString = new Dictionary < string , object > ( )
28+ {
29+ {
30+ "context" ,
31+ "context"
32+ }
33+ } ;
1634 private static readonly StartDialogOptions _startDialogOptions = new StartDialogOptions ( DialogInputType . PowerVirtualAgents , "botAppId" , new Dictionary < string , object > ( ) )
1735 {
1836 OperationContext = "context"
1937 } ;
2038
39+ private static readonly StartDialogOptions _startDialogWithCustomObjectOptions = new StartDialogOptions ( DialogInputType . PowerVirtualAgents , "botAppId" , dialogContextWithObject )
40+ {
41+ OperationContext = "context"
42+ } ;
43+
44+ private static readonly StartDialogOptions _startDialogWithStringOptions = new StartDialogOptions ( DialogInputType . PowerVirtualAgents , "botAppId" , dialogContextWithString )
45+ {
46+ OperationContext = "context"
47+ } ;
48+
2149 private static readonly StartDialogOptions _startDialogWithIdOptions = new StartDialogOptions ( dialogId , DialogInputType . PowerVirtualAgents , "botAppId" , new Dictionary < string , object > ( ) )
2250 {
2351 OperationContext = "context"
@@ -101,6 +129,14 @@ public void StopDialog_Return204NoContent(Func<CallDialog, Response<DialogResult
101129 callDialog => callDialog . StartDialogAsync ( _startDialogOptions )
102130 } ,
103131 new Func < CallDialog , Task < Response < DialogResult > > > ? [ ]
132+ {
133+ callDialog => callDialog . StartDialogAsync ( _startDialogWithCustomObjectOptions )
134+ } ,
135+ new Func < CallDialog , Task < Response < DialogResult > > > ? [ ]
136+ {
137+ callDialog => callDialog . StartDialogAsync ( _startDialogWithStringOptions )
138+ } ,
139+ new Func < CallDialog , Task < Response < DialogResult > > > ? [ ]
104140 {
105141 callDialog => callDialog . StartDialogAsync ( _startDialogWithIdOptions )
106142 } ,
@@ -116,6 +152,14 @@ public void StopDialog_Return204NoContent(Func<CallDialog, Response<DialogResult
116152 callDialog => callDialog . StartDialog ( _startDialogOptions )
117153 } ,
118154 new Func < CallDialog , Response < DialogResult > > ? [ ]
155+ {
156+ callDialog => callDialog . StartDialog ( _startDialogWithCustomObjectOptions )
157+ } ,
158+ new Func < CallDialog , Response < DialogResult > > ? [ ]
159+ {
160+ callDialog => callDialog . StartDialog ( _startDialogWithStringOptions )
161+ } ,
162+ new Func < CallDialog , Response < DialogResult > > ? [ ]
119163 {
120164 callDialog => callDialog . StartDialog ( _startDialogWithIdOptions )
121165 } ,
0 commit comments