Skip to content
Snippets Groups Projects
interfaces.ts 751 B
Newer Older
Jack Hu's avatar
Jack Hu committed
import { UserPatchRequest } from "./compiled_proto/app";
import { Category, Order, Product, TestResults, User } from "./types";

export interface ITestSuite {
    testRandomProduct(): Promise<Product>;
    testUserById(id: string): Promise<User>;
    testAllProducts(categoryId?: string): Promise<Product[]>;
    testProductById(productId: string): Promise<Product>;
    testAllCategories(): Promise<Category[]>;
    testAllOrders(): Promise<Order[]>;
    testOrdersByUser(id: string): Promise<Order[]>;
    testOrderById(id: string): Promise<Order>;
    testAllUsers(): Promise<User[]>;
    testInsertOrder(order: Order): Promise<void>;
    updateUser(patch: UserPatchRequest): Promise<void>;
    runSuite(iterations: number): Promise<TestResults>;
}