public void MissingFile() { var file = Path.Combine(TestOutputDirectory, Guid.NewGuid().ToString()); var clientKey = SymbolIndexer.TryGetSymbolClientKeyFromJsMap(file); Assert.Equal(null, clientKey); }
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); } }
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); }