Summary:
When I use NUnit3 TestCaseAttribute to parametrize LeanFT tests, TestTearDown()
throws this exception:
System.InvalidCastException: 'The of object of type "HP.LFT.Report.RunUnitVerificationNode" cannot be converted to type "HP.LFT.Report.IReportStructureEventArgs".'
Background:
I have created a fresh clean project from the LeanFT Nunit 3 Project
template which comes with the nice UnitTestClassBase
class. This class comes with this method causing the exception:
[TearDown]
public void BasicTearDown()
{
TestTearDown(); //exception is thrown here
}
Code example:
[Test]
[TestCase(5,5)]
public void FiveEqualsFive_TestCase_throwsException(int number, int number2)
{
Verify.AreEqual(number, number);
}
[Test]
public void FiveEqualsFive_WorksFine()
{
Verify.AreEqual(5, 5);
}
The same happens with TestCaseSourceAttribute
. I assume there is some issue generating the LeanFT report. Shouldn't it be possible to use the attribute with LeanFT?