/Source/Reporting/Machine.Specifications.Reporting.Specs/Generation/SpecificationTreeListenerSpecs.cs
https://github.com/machine/machine.specifications · C# · 40 lines · 30 code · 10 blank · 0 comment · 0 complexity · 3e4d22d74d0d7616acc0980da99a40ae MD5 · raw file
- using System;
-
- using Example;
-
- using FluentAssertions;
-
- using Machine.Specifications.Reporting.Generation;
- using Machine.Specifications.Runner;
- using Machine.Specifications.Runner.Impl;
-
- namespace Machine.Specifications.Reporting.Specs.Generation
- {
- [Subject(typeof(SpecificationTreeListener))]
- public class when_getting_a_tree_from_a_spec_run
- {
- static DefaultRunner runner;
- static SpecificationTreeListener listener;
-
- Establish context = () =>
- {
- listener = new SpecificationTreeListener();
- runner = new DefaultRunner(listener, RunOptions.Default);
- };
-
- Because of =
- () => runner.RunAssembly(typeof(when_a_customer_first_views_the_account_summary_page).Assembly);
-
- It should_set_the_total_specifications =
- () => listener.Run.TotalSpecifications.Should().Be(6);
-
- It should_set_the_report_generation_date =
- () => DateTime.Now.AddSeconds(-5).Should().BeOnOrBefore(listener.Run.Meta.GeneratedAt);
-
- It should_default_to_no_timestamp =
- () => listener.Run.Meta.ShouldGenerateTimeInfo.Should().BeFalse();
-
- It should_default_to_no_link_to_the_summary =
- () => listener.Run.Meta.ShouldGenerateIndexLink.Should().BeFalse();
- }
- }