Skip to content

Commit f39821b

Browse files
committed
Merge pull request #1714 from ThunderFrame/next
Fixes #1711 to run module-specific test methods, for each module
2 parents ccd6225 + e24e551 commit f39821b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

RetailCoder.VBE/UnitTesting/TestEngine.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,11 @@ public void Run(IEnumerable<TestMethod> tests)
6666
var testInitialize = module.Key.FindTestInitializeMethods(_state).ToList();
6767
var testCleanup = module.Key.FindTestCleanupMethods(_state).ToList();
6868

69+
var moduleTestMethods = testMethods
70+
.Where(test => test.QualifiedMemberName.QualifiedModuleName.ComponentName == module.Key.ComponentName);
71+
6972
Run(module.Key.FindModuleInitializeMethods(_state));
70-
foreach (var test in testMethods)
73+
foreach (var test in moduleTestMethods)
7174
{
7275
// no need to run setup/teardown for ignored tests
7376
if (test.Declaration.Annotations.Any(a => a.AnnotationType == AnnotationType.IgnoreTest))

0 commit comments

Comments
 (0)