public void Should_be_able_to_check_if_file_exists()
        {
            var dir = new VirtualDirectory();
            var file = new VirtualFile("testfile.txt");

            dir.AddFile(file);

            dir.FileExists("testfile.txt").Should().BeTrue();
        }
        public void Can_add_and_retrieve_files()
        {
            var dir = new VirtualDirectory();
            var file = new VirtualFile("testfile.txt");

            dir.AddFile(file);

            var retrieved = dir.GetFile("testfile.txt");

            retrieved.Should().NotBeNull().And.BeSameAs(file);
        }
 private void StubFile(string fileName, string content)
 {
     var file = new VirtualFile(fileName) {Content = content};
     _file.Directory.AddFile(file);
 }
 public void Setup()
 {
     var dir = new VirtualDirectory();
     _file = new VirtualFile("test.less") {Directory = dir};
     _compiler = new LessCompiler(new TestLogger());
 }
 public void Setting_content_sets_binary_content()
 {
     var file = new VirtualFile("testfile.txt") {Content = "blah blah blah"};
     file.BinaryContent.Should().NotBeNull();
 }
 public bool Equals(VirtualFile other)
 {
     if (ReferenceEquals(null, other)) return false;
     return ReferenceEquals(this, other) || Equals(other._fileName, _fileName);
 }