PageRenderTime 44ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/Source/Reporting/Machine.Specifications.Reporting.Specs/CollectReportingInformationRunListenerSpecs.cs

https://github.com/machine/machine.specifications
C# | 30 lines | 23 code | 7 blank | 0 comment | 0 complexity | fd15d3517925e52e09cdae4d2d70547a MD5 | raw file
Possible License(s): MIT, CC-BY-SA-3.0
  1. using Example.Random;
  2. using FluentAssertions;
  3. using Machine.Specifications.Reporting.Generation;
  4. using Machine.Specifications.Runner;
  5. using Machine.Specifications.Runner.Impl;
  6. namespace Machine.Specifications.Reporting.Specs
  7. {
  8. [Subject(typeof(CollectReportingInformationRunListener))]
  9. public class when_running_two_contexts_that_use_the_same_behavior
  10. {
  11. static DefaultRunner runner;
  12. static CollectReportingInformationRunListener reportListener;
  13. Establish context = () =>
  14. {
  15. reportListener = new CollectReportingInformationRunListener();
  16. runner = new DefaultRunner(reportListener,
  17. new RunOptions(new[] { "behavior usage" }, new string[0], new string[0]));
  18. };
  19. Because of = () => runner.RunAssembly(typeof(context_with_behaviors).Assembly);
  20. It should_collect_behavior_specifications_and_context_specifications =
  21. () => reportListener.ResultsBySpecification.Count.Should().Be(3);
  22. }
  23. }