blob: 60e45be9259a49fc81a66f36cf482172e67793af [file] [log] [blame]
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:front_end/src/api_prototype/file_system.dart';
class MockFileSystem implements FileSystem {
final String? scheme;
const MockFileSystem({this.scheme});
FileSystemEntity entityForUri(Uri uri) {
if (scheme != null && uri.scheme != scheme) throw "unsupported";
return new MockFileSystemEntity(uri, this);
class MockFileSystemEntity implements FileSystemEntity {
final Uri uri;
final FileSystem fileSystem;
MockFileSystemEntity(this.uri, this.fileSystem);
dynamic noSuchMethod(m) => super.noSuchMethod(m);