Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
mjkkirschner committed Nov 17, 2023
1 parent 46f301e commit b9f75cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Engine/ProtoCore/Lang/CallSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ private void UpdateCallsiteExecutionState(Object callsiteData, RuntimeCore runti
}
}*/
}
private static bool CheckIfTraceDataIsLegacySOAPFormat(string base64EncodedTraceData)
internal static bool CheckIfTraceDataIsLegacySOAPFormat(string base64EncodedTraceData)
{
var data = Convert.FromBase64String(base64EncodedTraceData);
if (data.Length > 17)
Expand Down
9 changes: 9 additions & 0 deletions test/DynamoCoreTests/CallsiteTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using Dynamo.Graph.Workspaces;
using FFITarget;
using NUnit.Framework;
using ProtoCore;
using static ProtoCore.CallSite;

namespace Dynamo.Tests
Expand Down Expand Up @@ -325,5 +326,13 @@ public void Callsite_ElementBinding_Timing()
Console.WriteLine(sw.Elapsed);
AssertPreviewValue("056d9c584f3b42acabec727e64188fae", Enumerable.Range(1502,1500).ToList());
}

[Test]
public void CanDetectLegacyTraceFormat()
{
var legacyTraceData =
"PFNPQVAtRU5WOkVudmVsb3BlIHhtbG5zOnhzaT0iaHR0cDovL3d3dyY2hlbWFzLm1pY3Jvc29mdC5jb20vc29hcC9lbmNvZGluZy";
Assert.True(CheckIfTraceDataIsLegacySOAPFormat(legacyTraceData));
}
}
}

0 comments on commit b9f75cd

Please sign in to comment.