public void GetProjects_MissingSettings_ThrowsException() { PavilotSettings settings = null; var service = new PavilotService(settings); Assert.ThrowsAsync <ArgumentNullException>(() => service.GetProjectsAsync()); }
public void GetProjects_MissingConfiguration_ThrowsException() { var builder = new ConfigurationBuilder() .AddJsonFile("appsettings.missing.json", optional: false, reloadOnChange: true); var configuration = builder.Build(); var service = new PavilotService(configuration); Assert.ThrowsAsync <ArgumentNullException>(() => service.GetProjectsAsync()); }