public EnvEndpoint(IEnvOptions options, IConfiguration configuration, IHostingEnvironment env, ILogger <EnvEndpoint> logger = null) : base(options) { _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); _env = env ?? throw new ArgumentNullException(nameof(env)); _logger = logger; }
public void Constructor_ThrowsIfNulls() { IEnvOptions options = null; IConfiguration configuration = null; IHostingEnvironment env = null; Assert.Throws <ArgumentNullException>(() => new EnvEndpoint(options, configuration, env)); options = new EnvEndpointOptions(); Assert.Throws <ArgumentNullException>(() => new EnvEndpoint(options, configuration, env)); configuration = new ConfigurationBuilder().Build(); Assert.Throws <ArgumentNullException>(() => new EnvEndpoint(options, configuration, env)); }
public EnvEndpoint(IEnvOptions options, IConfiguration configuration, IHostEnvironment env, ILogger <EnvEndpoint> logger = null)