private void InitializeConfig() { AppConfigInstance = new GisAppConfig(); //TODO Extend to MsSQL switch (DbSettings.DatabaseType) { case SourceType.Mongodb: AppConfigInstance.AddQueryConfigs(AppBuilderFromMongodb.BuildConfigApp(DbSettings)); break; case SourceType.MsSql: throw new NotImplementedException("Getting Query Data Configuration from MsSQL is not implemented"); default: throw new ArgumentOutOfRangeException(); } }
public void Test_get_query_config_by_name(string queryName, bool expectedResult) { //arrange _gisAppConfig.AddQueryConfigs(FakeData.GetConfigurationData()); //act QueryConfig config = _gisAppConfig.GetQueryInstance(queryName); //assert if (!expectedResult) { config.Should().BeNull(); } else { config.Should().NotBeNull(); config.Name.ToLower().Should().Be(queryName.ToLower()); } }