Refactor to use version object #59

Enable writing safer version aware logic.
This commit is contained in:
undergroundwires
2022-02-26 17:15:30 +01:00
parent d6bc33ec86
commit eeb1d5b0c4
14 changed files with 198 additions and 35 deletions

View File

@@ -1,9 +1,11 @@
import { IProjectInformation } from '@/domain/IProjectInformation';
import { Version } from '@/domain/Version';
import { VersionStub } from './VersionStub';
export class ProjectInformationStub implements IProjectInformation {
public name = 'name';
public version = 'version';
public version = new VersionStub();
public repositoryUrl = 'repositoryUrl';
@@ -22,7 +24,7 @@ export class ProjectInformationStub implements IProjectInformation {
return this;
}
public withVersion(version: string): ProjectInformationStub {
public withVersion(version: Version): ProjectInformationStub {
this.version = version;
return this;
}