コード例 #1
0
        public async Task GetJsMapDebugEntryAsync(string fileContents, bool calculateBlobId, string expectedBlobId, string expectedClientKey)
        {
            var file = Path.Combine(TestOutputDirectory, Guid.NewGuid().ToString());

            File.WriteAllText(file, fileContents);
            var entries = await SymbolIndexer.GetJsMapDebugEntryAsync(new FileInfo(file), calculateBlobId);

            Assert.Equal(1, entries.Length);
            var entry = entries[0];

            Assert.Equal(expectedBlobId, entry.BlobIdentifier?.ToString());

            var clientKeyParts = entry.ClientKey.Split('/');

            Assert.Equal(3, clientKeyParts.Length);
            Assert.Equal(expectedClientKey, clientKeyParts[1]);
            File.Delete(file);
        }