Skip to content

Commit 1cb3f4f

Browse files
committed
test fix
1 parent fe02fd5 commit 1cb3f4f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/CasCap.Api.Knx.Tests/TestBase.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
using Microsoft.Extensions.Hosting;
2+
using Microsoft.Extensions.Hosting.Internal;
3+
14
namespace CasCap.Tests;
25

36
/// <summary>
@@ -35,6 +38,9 @@ protected TestBase(ITestOutputHelper output)
3538
services.AddKnx(configuration);
3639
}
3740

41+
IHostEnvironment env = new HostingEnvironment { EnvironmentName = Environments.Development };
42+
services.AddSingleton(env);
43+
3844
//assign services to be tested
3945
_serviceProvider = services.BuildServiceProvider();
4046
_knxGroupAddressLookupSvc = _serviceProvider.GetRequiredService<KnxGroupAddressLookupService>();

0 commit comments

Comments
 (0)