| Index: pkg/analysis_server/test/index/store/typed_mocks.dart
|
| diff --git a/pkg/analysis_server/test/index/store/typed_mocks.dart b/pkg/analysis_server/test/index/store/typed_mocks.dart
|
| index d4e857bd763c54675da85e0aa49d1a51b93d2a60..3ec5089eaa26ef35fedc49434d853682fab9a5a0 100644
|
| --- a/pkg/analysis_server/test/index/store/typed_mocks.dart
|
| +++ b/pkg/analysis_server/test/index/store/typed_mocks.dart
|
| @@ -20,17 +20,34 @@ class MockAnalysisContext extends TypedMock implements AnalysisContext {
|
| }
|
|
|
|
|
| +class MockClassElement extends TypedMock implements ClassElement {
|
| + noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
| +}
|
| +
|
| +
|
| class MockCompilationUnitElement extends TypedMock implements
|
| CompilationUnitElement {
|
| noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
| }
|
|
|
|
|
| +class MockConstructorElement extends TypedMock implements
|
| + ConstructorElement {
|
| + noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
| +}
|
| +
|
| +
|
| class MockContextCodec extends TypedMock implements ContextCodec {
|
| noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
| }
|
|
|
|
|
| +class MockDartType extends StringTypedMock implements DartType {
|
| + MockDartType([String toString]) : super(toString);
|
| + noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
| +}
|
| +
|
| +
|
| class MockElement extends TypedMock implements Element {
|
| String _name;
|
| MockElement([this._name = '<element>']);
|
| @@ -44,6 +61,11 @@ class MockElementCodec extends TypedMock implements ElementCodec {
|
| }
|
|
|
|
|
| +class MockFieldElement extends TypedMock implements FieldElement {
|
| + noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
| +}
|
| +
|
| +
|
| class MockHtmlElement extends TypedMock implements HtmlElement {
|
| noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
| }
|
| @@ -70,6 +92,23 @@ class MockLogger extends TypedMock implements Logger {
|
| }
|
|
|
|
|
| +class MockMethodElement extends TypedMock implements MethodElement {
|
| + noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
| +}
|
| +
|
| +
|
| +class MockParameterElement extends StringTypedMock implements ParameterElement {
|
| + MockParameterElement([String toString]) : super(toString);
|
| + noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
| +}
|
| +
|
| +
|
| +class MockPropertyAccessorElement extends TypedMock implements
|
| + PropertyAccessorElement {
|
| + noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
| +}
|
| +
|
| +
|
| class MockRelationshipCodec extends TypedMock implements RelationshipCodec {
|
| noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
| }
|
| @@ -81,3 +120,20 @@ class MockSource extends TypedMock implements Source {
|
| noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
| String toString() => _name;
|
| }
|
| +
|
| +
|
| +class StringTypedMock extends TypedMock {
|
| + String _toString;
|
| +
|
| + StringTypedMock(this._toString);
|
| +
|
| + noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
|
| +
|
| + @override
|
| + String toString() {
|
| + if (_toString != null) {
|
| + return _toString;
|
| + }
|
| + return super.toString();
|
| + }
|
| +}
|
|
|