示例#1
0
        public void GetProjects_MissingSettings_ThrowsException()
        {
            PavilotSettings settings = null;
            var             service  = new PavilotService(settings);

            Assert.ThrowsAsync <ArgumentNullException>(() => service.GetProjectsAsync());
        }
示例#2
0
        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());
        }