public void SetTemplateMethodSadPath() { var options = new TestFormattableLogProviderOptions(); Action act = () => options.SetTemplate(null); act.Should().ThrowExactly <ArgumentNullException>().WithMessage("*template*"); }
public void SetTemplateMethodHappyPath() { var options = new TestFormattableLogProviderOptions(); options.SetTemplate("foo"); var formatter = options.FormatterRegistration.Invoke(_emptyServiceProvider); formatter.Should().BeOfType <TemplateLogFormatter>() .Which.Template.Should().Be("foo"); }