Kentico unit tests throw null reference exception when ASP.NET Core 6 project has this nuget package installed
Closed this issue · 3 comments
ttlaare commented
A null reference exception is thrown when running unit tests with the test class inheriting from the Kentico libraries test base class 'UnitTests' and referencing an ASP.NET CORE 6 project with this NuGet package installed.
[TestFixture]
public class Tests : UnitTests
{
[Test]
public void Test1()
{
Assert.Pass();
}
}
This exception will not get thrown when removing this Nuget package from the ASP.NET CORE 6 project.
Hotfix version: 13.0.68
heywills commented
Hiya @ttlaare , this issue is fixed in v13.0.7. It was caused by the module trying to initialize with a null configuration parameter.
https://www.nuget.org/packages/KenticoCommunity.StagingConfigurationModule/13.0.7
Here's the PR.
#11
Will you let me know if it works for you?