forked from asyncapi/modelina
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestRenderers.ts
45 lines (43 loc) · 1.89 KB
/
TestRenderers.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import {
AbstractRenderer,
InputMetaModel,
RenderOutput,
ConstrainedAnyModel
} from '../../src';
import { GoRenderer } from '../../src/generators/go/GoRenderer';
import { CSharpRenderer } from '../../src/generators/csharp/CSharpRenderer';
import { JavaRenderer } from '../../src/generators/java/JavaRenderer';
import { JavaScriptRenderer } from '../../src/generators/javascript/JavaScriptRenderer';
import { TypeScriptRenderer } from '../../src/generators/typescript/TypeScriptRenderer';
import { testOptions, TestGenerator } from './TestGenerator';
import { DartRenderer } from '../../src/generators/dart/DartRenderer';
import { RustRenderer } from '../../src/generators/rust/RustRenderer';
import { PythonRenderer } from '../../src/generators/python/PythonRenderer';
import { KotlinRenderer } from '../../src/generators/kotlin/KotlinRenderer';
import { PhpRenderer } from '../../src/generators/php/PhpRenderer';
export class TestRenderer extends AbstractRenderer {
constructor(presets = []) {
super(
testOptions,
new TestGenerator(),
presets,
new ConstrainedAnyModel('', undefined, ''),
new InputMetaModel()
);
}
render(): Promise<RenderOutput> {
return Promise.resolve(
RenderOutput.toRenderOutput({ result: '', renderedName: '' })
);
}
}
export class MockJavaRenderer extends JavaRenderer<any> {}
export class MockTypeScriptRenderer extends TypeScriptRenderer<any> {}
export class MockGoRenderer extends GoRenderer<any> {}
export class MockCSharpRenderer extends CSharpRenderer<any> {}
export class MockJavaScriptRenderer extends JavaScriptRenderer<any> {}
export class MockDartRenderer extends DartRenderer<any> {}
export class MockRustRenderer extends RustRenderer<any> {}
export class MockPythonRenderer extends PythonRenderer<any> {}
export class MockKotlinRenderer extends KotlinRenderer<any> {}
export class MockPhpRenderer extends PhpRenderer<any> {}