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>(); }
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(); } }
public void Single_BeginScenario_Responds_With_Success() { var request = new BeginScenarioRequest(); var response = processor.Process(request); response.Should().Be.InstanceOf<SuccessResponse>(); }
public void Nested_BeginScenario_Responds_With_Yikes() { var request = new BeginScenarioRequest(); processor.Process(request); var response = processor.Process(request); response.Should().Be.InstanceOf<YikesResponse>(); }