public WeatherForecastController(
     IConfiguration configuration,
     ILogger <WeatherForecastController> logger,
     SqlConnectionDeveloperDb sqlConnectionBegonia,
     IANNOUNCEMENT_GROUPRepository aNNOUNCEMENT_GROUPRepository,
     IANNOUNCEMENTRepository aNNOUNCEMENTRepository)
 {
     _configuration                = configuration;
     _logger                       = logger;
     _sqlConnectionBegonia         = sqlConnectionBegonia;
     _aNNOUNCEMENT_GROUPRepository = aNNOUNCEMENT_GROUPRepository;
     _aNNOUNCEMENTRepository       = aNNOUNCEMENTRepository;
 }
        public static void ClassInit(TestContext testContext)
        {
            var logFactory = LoggerFactory.Create(builder => builder.AddConsole());

            _logger = new Logger <WeatherForecastController>(logFactory);

            IConfigurationBuilder configuration = new ConfigurationBuilder();

            var connstr = testContext.Properties["begoniaConnStr"];

            Assert.IsTrue(connstr != null);

            var configDic = new Dictionary <string, string>()
            {
                { "ConnectionStrings:begonia", $"{connstr}" }
            };

            configuration.AddInMemoryCollection(configDic);

            _configuration = configuration.Build();

            var checkstr = _configuration.GetConnectionString("begonia");

            Check.That(checkstr).IsNotEmpty();

            _sqlConnectionBegonia = new SqlConnectionDeveloperDb(_configuration);

            _aNNOUNCEMENT_GROUPRepository = new ANNOUNCEMENT_GROUPRepository(_sqlConnectionBegonia);

            _aNNOUNCEMENTRepository = new GradesRepository(_sqlConnectionBegonia);

            /*
             * var announcementProvider = new Mock<IAnnouncementProvider>();
             * announcementProvider
             *  .Setup(x => x.GetList())
             *  .ReturnsAsync(Enumerable.Repeat(new Announcement(), 1));
             */
        }