private void LoadFromDisk(string path) { var fileContents = _disk.GetViewSource(path); string contents; using (TextReader reader = new StreamReader(fileContents.OpenViewStream())) contents = reader.ReadToEnd(); _cache.Set(path, contents); }
public void GetSourceNotFound() { _viewFolder.GetViewSource("Home\\NoSuchFile.spark"); }
public void GetSourceNotFound() { Assert.That(() => _viewFolder.GetViewSource(Path.Combine("Home", "NoSuchFile.spark")), Throws.TypeOf <FileNotFoundException>()); }