Skip to content

Commit

Permalink
remove null check since GetMethodInfoForTestMethod cant return null (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed May 25, 2024
1 parent 83f8a04 commit 655dd83
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/Adapter/MSTest.TestAdapter/Execution/TypeCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -734,11 +734,6 @@ private bool IsAssemblyOrClassCleanupMethod<TCleanupAttribute>(MethodInfo method
DebugEx.Assert(testClassInfo != null, "testClassInfo is Null");

MethodInfo methodInfo = GetMethodInfoForTestMethod(testMethod, testClassInfo);
if (methodInfo == null)
{
// Means the specified test method could not be found.
return null;
}

ExpectedExceptionBaseAttribute? expectedExceptionAttribute = _reflectionHelper.ResolveExpectedExceptionHelper(methodInfo, testMethod);
int timeout = GetTestTimeout(methodInfo, testMethod);
Expand Down

0 comments on commit 655dd83

Please sign in to comment.