public TaskCompletionSource <string> AppendVisitorInfoForUrl() { latch = new CountdownEvent(1); stringOutput = new TaskCompletionSource <string>(); ACPIdentity.AppendVisitorInfoForURL("https://example.com", new StringCallback()); latch.Wait(1000); stringOutput.SetResult(callbackString); return(stringOutput); }
public void TestAppendVisitorInfoForUrl_Returns_AppendedUrl() { // setup latch = new CountdownEvent(2); String url = "https://test.com"; String orgid = "972C898555E9F7BC7F000101%40AdobeOrg"; // test ACPIdentity.GetExperienceCloudId(new EcidCallback()); ACPIdentity.AppendVisitorInfoForURL(url, new StringCallback()); latch.Wait(1000); latch.Dispose(); // verify Assert.That(retrievedString, Is.StringContaining(url)); Assert.That(retrievedString, Is.StringContaining(retrievedEcid)); Assert.That(retrievedString, Is.StringContaining(orgid)); }