コード例 #1
0
        public void MissingFile()
        {
            var file      = Path.Combine(TestOutputDirectory, Guid.NewGuid().ToString());
            var clientKey = SymbolIndexer.TryGetSymbolClientKeyFromJsMap(file);

            Assert.Equal(null, clientKey);
        }
コード例 #2
0
        public void LockedFile()
        {
            var file = Path.Combine(TestOutputDirectory, Guid.NewGuid().ToString());

            using (var fs = new FileStream(file, FileMode.Create, FileAccess.Write, FileShare.None))
            {
                var clientKey = SymbolIndexer.TryGetSymbolClientKeyFromJsMap(file);
                Assert.Equal(null, clientKey);
            }
        }
コード例 #3
0
        public void TryGetSymbolClientKeyFromJsMapTest(string expectedKey, string fileContents)
        {
            var file = Path.Combine(TestOutputDirectory, Guid.NewGuid().ToString());

            File.WriteAllText(file, fileContents);
            var clientKey = SymbolIndexer.TryGetSymbolClientKeyFromJsMap(file);

            Assert.Equal(expectedKey, clientKey);
            File.Delete(file);
        }