public void TestRendererWithoutHashLookup() { var pathTable = new PathTable(); var renderer = new PipFragmentRenderer(pathTable); DoTestRenderer(pathTable, renderer, FileContentInfo.CreateWithUnknownLength(ContentHashingUtilities.ZeroHash).Render()); var moniker = new StringMoniker("123"); XAssert.AreEqual(moniker.Id, renderer.Render(PipFragment.CreateIpcMonikerForTesting(moniker, pathTable.StringTable))); }
public void TestRendererWithHashLookup() { var pathTable = new PathTable(); var fakeContentInfo = FileContentInfo.CreateWithUnknownLength(ContentHash.Random()); var expectedHash = fakeContentInfo.Render(); var renderer = new PipFragmentRenderer(pathTable, (mId) => "XYZ:" + mId, (f) => fakeContentInfo); DoTestRenderer(pathTable, renderer, expectedHash); var moniker = new StringMoniker("123"); XAssert.AreEqual("XYZ:123", renderer.Render(PipFragment.CreateIpcMonikerForTesting(moniker, pathTable.StringTable))); }