Skip to content

Commit

Permalink
Fix TypeCache
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink committed May 12, 2023
1 parent a7c68c0 commit 3bd8304
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Adapter/MSTest.TestAdapter/Execution/TypeCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,24 @@ internal TypeCache(ReflectHelper reflectionHelper)
/// <summary>
/// Gets Class Info cache which has cleanup methods to execute.
/// </summary>
public IReadOnlyCollection<TestClassInfo> ClassInfoListWithExecutableCleanupMethods =>
_classInfoCache.Values.Where(classInfo => classInfo.HasExecutableCleanupMethod).ToList();
public TestClassInfo[] ClassInfoListWithExecutableCleanupMethods =>
_classInfoCache.Values.Where(classInfo => classInfo.HasExecutableCleanupMethod).ToArray();

/// <summary>
/// Gets Assembly Info cache which has cleanup methods to execute.
/// </summary>
public IReadOnlyCollection<TestAssemblyInfo> AssemblyInfoListWithExecutableCleanupMethods =>
_testAssemblyInfoCache.Values.Where(assemblyInfo => assemblyInfo.HasExecutableCleanupMethod).ToList();
public TestAssemblyInfo[] AssemblyInfoListWithExecutableCleanupMethods =>
_testAssemblyInfoCache.Values.Where(assemblyInfo => assemblyInfo.HasExecutableCleanupMethod).ToArray();

/// <summary>
/// Gets the set of cached assembly info values.
/// </summary>
public IReadOnlyCollection<TestAssemblyInfo> AssemblyInfoCache => _testAssemblyInfoCache.Values.ToList();
public TestAssemblyInfo[] AssemblyInfoCache => _testAssemblyInfoCache.Values.ToArray();

/// <summary>
/// Gets the set of cached class info values.
/// </summary>
public IReadOnlyCollection<TestClassInfo> ClassInfoCache => _classInfoCache.Values.ToList();
public TestClassInfo[] ClassInfoCache => _classInfoCache.Values.ToArray();

/// <summary>
/// Get the test method info corresponding to the parameter test Element.
Expand Down

0 comments on commit 3bd8304

Please sign in to comment.