diff --git a/tests/Telegram.Tests/TestTelegramHostedService.cs b/tests/Telegram.Tests/TestTelegramHostedService.cs index ba47758..c6d70d4 100644 --- a/tests/Telegram.Tests/TestTelegramHostedService.cs +++ b/tests/Telegram.Tests/TestTelegramHostedService.cs @@ -26,10 +26,10 @@ namespace Telegram.Tests public void Setup() { var conf = new ConfigurationBuilder() + .SetBasePath(AppContext.BaseDirectory) + .AddJsonFile("appsettings.json", false) .AddEnvironmentVariables() - .AddJsonFile("appsettings.json") .Build(); - Console.WriteLine(conf.GetValue("telegram_test_token")); _configMock = new Mock(); _configMock.Setup(c => c.Token).Returns(conf.GetValue("telegram_test_token")); _services = new ServiceCollection();