model filling

This commit is contained in:
IDONTSUDO 2023-10-27 21:22:48 +03:00
parent c27c061c15
commit 6ca82f8c2e
29 changed files with 245 additions and 132 deletions

View file

@ -0,0 +1,19 @@
import { PaginationDataBaseModelUseCase } from "../../src/core/usecases/pagination_database_model_usecase";
import { ITestModel, TestDBModel } from "../model/test_db_mongo_model";
export class PaginationDataBaseModelUseCaseTest {
async test() {
let testIsSuccess = false;
await (
await new PaginationDataBaseModelUseCase<ITestModel>(TestDBModel, 1).call(
1
)
).fold(
(s) => {
testIsSuccess = s.length === 1;
},
(_e) => {}
);
return testIsSuccess;
}
}