public void ConstructWithNullWriter(HtmlReportFormatter reporter, IApplicationModel model, MigrationContext context, IRunState state, IReportWriter writer, ILogger logger, Exception e) { "Given an reporter" .x(() => reporter.Should().BeNull()); "And a model" .x(() => model = new AzureIntegrationServicesModel()); "And run state" .x(() => state = TestHelper.BuildRunState(model)); "And a context" .x(() => context = TestHelper.BuildContext()); "And a writer" .x(() => writer.Should().BeNull()); "And a logger" .x(() => logger = _mockLogger.Object); "When constructing with a null writer" .x(() => e = Record.Exception(() => new HtmlReportFormatter(model, context, state, writer, logger))); "Then the constructor should throw an exception" .x(() => e.Should().NotBeNull().And.Subject.Should().BeOfType <ArgumentNullException>().Which.ParamName.Should().Be("writer")); }