refactor application.yaml to become an os definition #40

This commit is contained in:
undergroundwires
2020-09-08 21:47:18 +01:00
parent e4b6cdfb18
commit f7557bcc0f
62 changed files with 1926 additions and 573 deletions

View File

@@ -0,0 +1,15 @@
import { IEnumParser } from '@/application/Common/Enum';
export function mockEnumParser<T>(inputName: string, inputValue: string, outputValue: T): IEnumParser<T> {
return {
parseEnum: (value, name) => {
if (name !== inputName) {
throw new Error(`Unexpected name: "${name}"`);
}
if (value !== inputValue) {
throw new Error(`Unexpected value: "${value}"`);
}
return outputValue;
},
};
}