public async Task FailsToQuerySession() { using (var testClient = new HttpClient(new FailToEndSession()) { BaseAddress = new Uri("https://cvnet2.radishsystems.com/ivr/api/") }) { var workflow = new QuerySessionWorkflow(testClient); var response = await workflow.Process(connectEvent, context); Assert.Equal(JTokenType.Boolean, response["LambdaResult"].Type); Assert.True((bool)response["LambdaResult"]); Assert.Equal(JTokenType.Boolean, response["SessionRetrieved"].Type); Assert.False((bool)response["SessionRetrieved"]); Assert.Equal(JTokenType.Boolean, response["SessionTimeout"].Type); Assert.True((bool)response["SessionTimeout"]); } }
public async Task SuccessfullyQuerySession() { using (var testClient = new HttpClient(new SuccessfullyGetSession()) { BaseAddress = new Uri("https://cvnet2.radishsystems.com/ivr/api/") }) { var workflow = new QuerySessionWorkflow(testClient); var response = await workflow.Process(connectEvent, context); Assert.Equal(JTokenType.Boolean, response["LambdaResult"].Type); Assert.True((bool)response["LambdaResult"]); Assert.Equal("connected", (string)response["SessionStatus"]); Assert.Equal(JTokenType.String, response["SessionUrl"].Type); Assert.Equal(JTokenType.String, response["PropertiesUrl"].Type); Assert.Equal(JTokenType.String, response["ControlMessageUrl"].Type); Assert.Equal(JTokenType.String, response["Property1"].Type); Assert.Equal(JTokenType.String, response["Property2"].Type); } }