Skip to content

Commit

Permalink
📝 (docs): update MigrationTools.xml with latest commit details
Browse files Browse the repository at this point in the history
Update the MigrationTools.xml file to reflect the latest commit details, including the commit hash, commit date, and other related metadata. This ensures that the documentation is up-to-date with the current state of the repository.

✅ (tests): update TfsNodeStructureTests for consistency and add null check

Update the TfsNodeStructureTests to use 'SourceServer' and 'TargetServer' instead of 'Source Project' and 'Target Project' for consistency. Add a null check in the GetTfsNodeStructure method to prevent potential null reference exceptions. This improves the reliability and readability of the test code.
  • Loading branch information
MrHinsh committed Aug 16, 2024
1 parent 8b6cfbe commit 52b9a74
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
14 changes: 7 additions & 7 deletions docs/Reference/Generated/MigrationTools.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using MigrationTools.Tests;
using MigrationTools.TestExtensions;
using System.Threading.Tasks;
using System;

namespace MigrationTools.ProcessorEnrichers.Tests
{
Expand Down Expand Up @@ -97,10 +98,10 @@ public void TestFixAreaPath_WhenAreaPathInQuery_WithPrefixProjectToNodesDisabled
{
var nodeStructure = GetTfsNodeStructure();

string WIQLQueryBit = @"SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.AreaPath] = 'Source Project\Area\Path1' AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')";
string expectTargetQueryBit = @"SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.AreaPath] = 'Target Project\Area\Path1' AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')";
string WIQLQueryBit = @"SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.AreaPath] = 'SourceServer\Area\Path1' AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')";
string expectTargetQueryBit = @"SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.AreaPath] = 'TargetServer\Area\Path1' AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')";

string targetWIQLQueryBit = nodeStructure.FixAreaPathAndIterationPathForTargetQuery(WIQLQueryBit, "Source Project", "Target Project", null);
string targetWIQLQueryBit = nodeStructure.FixAreaPathAndIterationPathForTargetQuery(WIQLQueryBit, "SourceServer", "TargetServer", null);

Assert.AreEqual(expectTargetQueryBit, targetWIQLQueryBit);
}
Expand Down Expand Up @@ -196,6 +197,10 @@ public void TestFixAreaPathAndIteration_WhenMultipleOccuranceWithMixtureOrEqualA

private static TfsNodeStructure GetTfsNodeStructure(TfsNodeStructureOptions options)
{
if (options == null)
{
throw new Exception();
}
var settings = new TfsNodeStructureSettings() { SourceProjectName = "SourceProject", TargetProjectName = "TargetProject", FoundNodes = new Dictionary<string, bool>() };
return GetTfsNodeStructure(options, settings);
}
Expand Down

0 comments on commit 52b9a74

Please sign in to comment.