mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
40 lines
1.4 KiB
TypeScript
40 lines
1.4 KiB
TypeScript
import {DBTestHelper} from '../../../DBTestHelper';
|
|
import {GalleryManager} from '../../../../../src/backend/model/database/sql/GalleryManager';
|
|
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';
|
|
|
|
const deepEqualInAnyOrder = require('deep-equal-in-any-order');
|
|
const chai = require('chai');
|
|
|
|
chai.use(deepEqualInAnyOrder);
|
|
const {expect} = chai;
|
|
|
|
// to help WebStorm to handle the test cases
|
|
declare let describe: any;
|
|
declare const before: any;
|
|
declare const after: any;
|
|
const tmpDescribe = describe;
|
|
describe = DBTestHelper.describe();
|
|
|
|
|
|
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);
|
|
}
|
|
|
|
}
|
|
|
|
describe('GalleryManager', (sqlHelper: DBTestHelper) => {
|
|
describe = tmpDescribe;
|
|
|
|
});
|