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
|
|
|
|
|
|
|
/**
|
|
|
|
* Mock for CreditsApi
|
|
|
|
*/
|
|
|
|
export class ProjectsApiMock implements ProjectsApi {
|
|
|
|
private mockProject: Project;
|
|
|
|
|
|
|
|
public setMockProject(mockCredits: Project): void {
|
|
|
|
this.mockProject = mockCredits;
|
|
|
|
}
|
|
|
|
|
|
|
|
create(createProjectModel: CreateProjectModel): Promise<Project> {
|
|
|
|
throw new Error('not implemented');
|
|
|
|
}
|
|
|
|
|
|
|
|
delete(projectId: string): Promise<void> {
|
|
|
|
throw new Error('not implemented');
|
|
|
|
}
|
|
|
|
|
|
|
|
get(): Promise<Project[]> {
|
|
|
|
const result = Array<Project>();
|
|
|
|
result.push(this.mockProject);
|
|
|
|
|
|
|
|
return Promise.resolve(result);
|
|
|
|
}
|
|
|
|
|
|
|
|
update(projectId: string, description: string): Promise<void> {
|
|
|
|
throw new Error('not implemented');
|
|
|
|
}
|
|
|
|
}
|