Skip to content

Commit

Permalink
Merge pull request #24 from Tinkoff/fix_AllureXUnitTheoryDiscoverer
Browse files Browse the repository at this point in the history
Fix AllureXUnitTheoryDiscoverer
  • Loading branch information
rus-art authored Apr 7, 2022
2 parents 059b0ce + 25db6bd commit e8002f5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Allure.XUnit/AllureXunitTheoryDiscover.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public override IEnumerable<IXunitTestCase> Discover(ITestFrameworkDiscoveryOpti
var dataAttribute = item.TestMethod.Method
.GetCustomAttributes(typeof(DataAttribute)).FirstOrDefault() as IReflectionAttributeInfo;

var memberDataAttribute = dataAttribute?.Attribute as MemberDataAttribute;
if (memberDataAttribute is not null && item.TestMethodArguments is null)
if (dataAttribute?.Attribute is DataAttribute memberDataAttribute && item.TestMethodArguments is null)
{
var argumentSets = memberDataAttribute
.GetData(item.TestMethod.Method.ToRuntimeMethod());
Expand Down

0 comments on commit e8002f5

Please sign in to comment.