diff --git a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestPlansAndSuitesMigrationProcessor.cs b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestPlansAndSuitesMigrationProcessor.cs index 79662a0ef..858bae3ec 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestPlansAndSuitesMigrationProcessor.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Processors/TfsTestPlansAndSuitesMigrationProcessor.cs @@ -615,7 +615,7 @@ private ITestPlan FindTestPlan(string planName, int sourcePlanId) Log.LogWarning("We found multiple test Plans with the name '{TestPlanName}'. They have ID(s) of '{result}'! We only have name at this point as a unique identifier and duplicates will break the code. Ensure that all Test Plans have unique names.", planName, result); throw new Exception(string.Format("Test plans {0} all have the same name!", result)); } - testPlan = testPlans[0]; + testPlan = testPlans.FirstOrDefault(); if (testPlan != null) {