Esempio n. 1
0
        public void BeginScenario_Then_EndScenario_Responds_With_Success()
        {
            var beginRequest = new BeginScenarioRequest();
            var endRequest = new EndScenarioRequest();
            processor.Process(beginRequest);
            var response = processor.Process(endRequest);

            response.Should().Be.InstanceOf<SuccessResponse>();
        }
Esempio n. 2
0
        private Response ProcessBeginScenario(BeginScenarioRequest request)
        {
            if (scenarioInProgress) {
                return new YikesResponse();
            } else {
                scenarioInProgress = true;

                var serializer = new JsonSerializer();
                var tags = (request.Tags == null) ? null : request.Tags.Select(t => serializer.Deserialize<string>(new JTokenReader(t))).ToArray();
                OnBeforeScenario(tags);

                return new SuccessResponse();
            }
        }
Esempio n. 3
0
        public void Single_BeginScenario_Responds_With_Success()
        {
            var request = new BeginScenarioRequest();
            var response = processor.Process(request);

            response.Should().Be.InstanceOf<SuccessResponse>();
        }
Esempio n. 4
0
        public void Nested_BeginScenario_Responds_With_Yikes()
        {
            var request = new BeginScenarioRequest();
            processor.Process(request);
            var response = processor.Process(request);

            response.Should().Be.InstanceOf<YikesResponse>();
        }