/Source/Reporting/Machine.Specifications.Reporting.Specs/CollectReportingInformationRunListenerSpecs.cs
C# | 30 lines | 23 code | 7 blank | 0 comment | 0 complexity | fd15d3517925e52e09cdae4d2d70547a MD5 | raw file
Possible License(s): MIT, CC-BY-SA-3.0
- using Example.Random;
-
- using FluentAssertions;
-
- using Machine.Specifications.Reporting.Generation;
- using Machine.Specifications.Runner;
- using Machine.Specifications.Runner.Impl;
-
- namespace Machine.Specifications.Reporting.Specs
- {
- [Subject(typeof(CollectReportingInformationRunListener))]
- public class when_running_two_contexts_that_use_the_same_behavior
- {
- static DefaultRunner runner;
- static CollectReportingInformationRunListener reportListener;
-
- Establish context = () =>
- {
- reportListener = new CollectReportingInformationRunListener();
-
- runner = new DefaultRunner(reportListener,
- new RunOptions(new[] { "behavior usage" }, new string[0], new string[0]));
- };
-
- Because of = () => runner.RunAssembly(typeof(context_with_behaviors).Assembly);
-
- It should_collect_behavior_specifications_and_context_specifications =
- () => reportListener.ResultsBySpecification.Count.Should().Be(3);
- }
- }