2021-04-02 03:48:38 +08:00
|
|
|
import {DBTestHelper} from '../../../DBTestHelper';
|
2019-12-15 00:27:01 +08:00
|
|
|
import {GalleryManager} from '../../../../../src/backend/model/database/sql/GalleryManager';
|
2022-01-15 03:57:20 +08:00
|
|
|
import {ObjectManagers} from '../../../../../src/backend/model/ObjectManagers';
|
|
|
|
import {SQLConnection} from '../../../../../src/backend/model/database/sql/SQLConnection';
|
|
|
|
import {DirectoryEntity} from '../../../../../src/backend/model/database/sql/enitites/DirectoryEntity';
|
|
|
|
import {ParentDirectoryDTO} from '../../../../../src/common/entities/DirectoryDTO';
|
|
|
|
import {Connection} from 'typeorm';
|
2019-01-28 03:36:42 +08:00
|
|
|
|
2022-01-15 03:57:20 +08:00
|
|
|
const deepEqualInAnyOrder = require('deep-equal-in-any-order');
|
|
|
|
const chai = require('chai');
|
|
|
|
|
|
|
|
chai.use(deepEqualInAnyOrder);
|
|
|
|
const {expect} = chai;
|
2019-01-28 03:36:42 +08:00
|
|
|
|
|
|
|
// to help WebStorm to handle the test cases
|
|
|
|
declare let describe: any;
|
2022-01-15 03:57:20 +08:00
|
|
|
declare const before: any;
|
2019-01-28 03:36:42 +08:00
|
|
|
declare const after: any;
|
2022-01-15 03:57:20 +08:00
|
|
|
const tmpDescribe = describe;
|
2021-04-02 03:48:38 +08:00
|
|
|
describe = DBTestHelper.describe();
|
2019-01-28 03:36:42 +08:00
|
|
|
|
2022-01-15 03:57:20 +08:00
|
|
|
|
|
|
|
class GalleryManagerTest extends GalleryManager {
|
|
|
|
|
|
|
|
|
|
|
|
public async selectParentDir(connection: Connection, directoryName: string, directoryParent: string): Promise<ParentDirectoryDTO> {
|
|
|
|
return super.selectParentDir(connection, directoryName, directoryParent);
|
|
|
|
}
|
|
|
|
|
|
|
|
public async fillParentDir(connection: Connection, dir: ParentDirectoryDTO): Promise<void> {
|
|
|
|
return super.fillParentDir(connection, dir);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-04-02 03:48:38 +08:00
|
|
|
describe('GalleryManager', (sqlHelper: DBTestHelper) => {
|
2022-01-15 03:57:20 +08:00
|
|
|
describe = tmpDescribe;
|
|
|
|
|
2019-01-28 03:36:42 +08:00
|
|
|
});
|