mirror of
https://github.com/yawaflua/Telegram.Net.git
synced 2025-12-09 20:19:28 +02:00
Try to fix error with tests
This commit is contained in:
@@ -26,10 +26,10 @@ namespace Telegram.Tests
|
|||||||
public void Setup()
|
public void Setup()
|
||||||
{
|
{
|
||||||
var conf = new ConfigurationBuilder()
|
var conf = new ConfigurationBuilder()
|
||||||
|
.SetBasePath(AppContext.BaseDirectory)
|
||||||
|
.AddJsonFile("appsettings.json", false)
|
||||||
.AddEnvironmentVariables()
|
.AddEnvironmentVariables()
|
||||||
.AddJsonFile("appsettings.json")
|
|
||||||
.Build();
|
.Build();
|
||||||
Console.WriteLine(conf.GetValue<string>("telegram_test_token"));
|
|
||||||
_configMock = new Mock<ITelegramBotConfig>();
|
_configMock = new Mock<ITelegramBotConfig>();
|
||||||
_configMock.Setup(c => c.Token).Returns(conf.GetValue<string>("telegram_test_token"));
|
_configMock.Setup(c => c.Token).Returns(conf.GetValue<string>("telegram_test_token"));
|
||||||
_services = new ServiceCollection();
|
_services = new ServiceCollection();
|
||||||
|
|||||||
Reference in New Issue
Block a user