TestRunCommand WhenSendingTestRunAsJson(string testWorkflowName, TestRunStatuses status, string alternativeUrl, ITestRunCommand testRunCommand)
 {
     var testRun = new TestRun();
     (testRun as TestRun).SetWorkflow(WorkflowCollection.Workflows.First(wfl => wfl.Name == testWorkflowName));
     if (null == testRunCommand)
         _response = _browser.Get(alternativeUrl, with => {
             // with.JsonBody(testRunCommand);
             with.Accept("application/json");
         });
     else
         _response = _browser.Get(alternativeUrl, with => {
             with.JsonBody(testRunCommand);
             with.Accept("application/json");
         });
     
     Xunit.Assert.Equal(HttpStatusCode.Created, _response.StatusCode);
     
     return _response.Body.DeserializeJson<TestRunCommand>();
 }
Exemple #2
0
 TestRunCommand WHEN_sending_testRun_as_json(string testWorkflowName, TestRunStatuses status, string alternativeUrl, ITestRunCommand testRunCommand)
 {
     var testRun = new TestRun();
     // var testRunCommand = new TestRunCommand { WorkflowName = testWorkflowName, Status = status };
     (testRun as TestRun).SetWorkflow(WorkflowCollection.Workflows.First(wfl => wfl.Name == testWorkflowName));
     if (null == testRunCommand)
         _response = _browser.Post(alternativeUrl, with => {
             // with.JsonBody(testRunCommand);
             with.Accept("application/json");
         });
     else
         _response = _browser.Post(alternativeUrl, with => {
             with.JsonBody(testRunCommand);
             with.Accept("application/json");
         });
     return _response.Body.DeserializeJson<TestRunCommand>();
 }
Exemple #3
0
 void WhenSendingTestRunAsJson(string testWorkflowName, string alternativeUrl, ITestRunCommand testRunCommand)
 {
     var testRun = new TestRun();
     ((TestRun) testRun).SetWorkflow(WorkflowCollection.Workflows.First(wfl => wfl.Name == testWorkflowName));
     if (null == testRunCommand)
         _response = _browser.Post(alternativeUrl, with => {
             // with.JsonBody(testRunCommand);
             with.Accept("application/json");
         });
     else
         _response = _browser.Post(alternativeUrl, with => {
             with.JsonBody(testRunCommand);
             with.Accept("application/json");
         });
 }