Пример #1
0
        public void UseCrestShouldReturnThePassedInValue()
        {
            IWebHostBuilder builder = Substitute.For <IWebHostBuilder>();

            IWebHostBuilder result = CrestWebHostBuilderExtensions.UseCrest(builder);

            Assert.That(result, Is.SameAs(builder));
        }
Пример #2
0
        public void UseCrestShouldRegisterTheStartupClass()
        {
            IWebHostBuilder builder = Substitute.For <IWebHostBuilder>();

            CrestWebHostBuilderExtensions.UseCrest(builder);

            builder.Received().UseSetting(
                WebHostDefaults.ApplicationKey,
                Arg.Any <string>());
        }
Пример #3
0
 public void UseCrestShouldCheckForNullArguments()
 {
     Assert.That(
         () => CrestWebHostBuilderExtensions.UseCrest(null),
         Throws.InstanceOf <ArgumentNullException>());
 }