INNER CODE UNIT · C#
TestCases
Azure/logicapps · LogicAppsSampleTestFramework/TestCases/TestCases.cs:18
public class TestCases
{
/// <summary>
/// Simple request-response workflow test.
/// </summary>
[TestMethod]
public void RequestResponse()
{
var workflowName = "requestresponseworkflow";
var workflowDefinition = File.ReadAllText($"TestFiles\\{workflowName}.json");
using (new WorkflowTestHost(new WorkflowTestInput[] { new WorkflowTestInput(workflowName, workflowDefinition) }))
using (var client = new HttpClient())
{
// Get workflow callback URL.
var response = client.PostAsync(TestEnvironment.GetTriggerCallbackRequestUri(flowName: workflowName, triggerName: "manual"), null).Result;
Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);