Beispiel #1
0
        public void StepFailed_With_Backtrace()
        {
            var stepFailedResponse = new StepFailedResponse("The wires are down") { Backtrace = "Some.Foreign.ExceptionType" };
            const string json = @"[""fail"",{""message"":""The wires are down"",""backtrace"":""Some.Foreign.ExceptionType""}]";

            stepFailedResponse.JsonText.Should().Be.EqualTo(json);
        }
Beispiel #2
0
        public void StepFailed_With_Message_Only()
        {
            var stepFailedResponse = new StepFailedResponse("The wires are down");
            const string json = @"[""fail"",{""message"":""The wires are down""}]";

            stepFailedResponse.JsonText.Should().Be.EqualTo(json);
        }
Beispiel #3
0
        public void StepFailed_Generates_Correct_JsonText()
        {
            var stepFailedResponse = new StepFailedResponse("The wires are down") { Exception = "Some.Foreign.ExceptionType" };
            const string json = @"[""fail"",{""message"":""The wires are down"",""exception"":""Some.Foreign.ExceptionType""}]";

            stepFailedResponse.JsonText.Should().Be.EqualTo(json);
        }