2019-08-30 12:34:51 +01:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
2019-09-09 11:33:39 +01:00
|
|
|
import { CreateProjectModel, Project, ProjectsApi } from '@/types/projects';
|
2019-08-30 12:34:51 +01:00
|
|
|
|
|
|
|
/**
|
2019-09-27 15:41:04 +01:00
|
|
|
* Mock for ProjectsApi
|
2019-08-30 12:34:51 +01:00
|
|
|
*/
|
|
|
|
export class ProjectsApiMock implements ProjectsApi {
|
2019-09-27 15:41:04 +01:00
|
|
|
private mockProjects: Project[];
|
2019-08-30 12:34:51 +01:00
|
|
|
|
2019-09-27 15:41:04 +01:00
|
|
|
public setMockProjects(mockProjects: Project[]): void {
|
|
|
|
this.mockProjects = mockProjects;
|
2019-08-30 12:34:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
create(createProjectModel: CreateProjectModel): Promise<Project> {
|
|
|
|
throw new Error('not implemented');
|
|
|
|
}
|
|
|
|
|
|
|
|
delete(projectId: string): Promise<void> {
|
|
|
|
throw new Error('not implemented');
|
|
|
|
}
|
|
|
|
|
|
|
|
get(): Promise<Project[]> {
|
2019-09-27 15:41:04 +01:00
|
|
|
return Promise.resolve(this.mockProjects);
|
2019-08-30 12:34:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
update(projectId: string, description: string): Promise<void> {
|
|
|
|
throw new Error('not implemented');
|
|
|
|
}
|
|
|
|
}
|