Tim Glasgow
2 years ago
1 changed files with 21 additions and 0 deletions
@ -0,0 +1,21 @@ |
|||
import { Score } from "../realm/entities/Score"; |
|||
import { System } from "../realm/entities/System"; |
|||
import { User } from "../realm/entities/User"; |
|||
|
|||
export class MockRealm{ |
|||
|
|||
constructor(schemaVersion){ |
|||
this.schemaVersion = schemaVersion; |
|||
this.SystemRepo = System.name; |
|||
this.ScoreRepo = Score.name; |
|||
this.UserRepo = User.name; |
|||
|
|||
this[this.SystemRepo] = []; |
|||
this[this.ScoreRepo] = []; |
|||
this[this.UserRepo] = []; |
|||
} |
|||
|
|||
create(repoName, entity){ |
|||
this[repoName].push(entity); |
|||
} |
|||
} |
Loading…
Reference in new issue