diff --git a/squarenotsquare/__mock__/mockRealmObject.js b/squarenotsquare/__mock__/mockRealmObject.js new file mode 100644 index 0000000..22c409b --- /dev/null +++ b/squarenotsquare/__mock__/mockRealmObject.js @@ -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); + } +} \ No newline at end of file