delta-store
Version:
An API for a store with change records
34 lines (27 loc) • 600 B
text/typescript
/**
* Created by Papa on 1/10/2016.
*/
import {DocumentHandle} from '../src/google/realtime/DocumentHandle';
import {ChangeRecord} from '../src/ChangeModel';
import {Injectable, NgGoogleRealtimeAdaptor} from "./Injectables";
()
export class RealtimeApiTest {
handle:DocumentHandle;
constructor(
private adaptor:NgGoogleRealtimeAdaptor
) {
}
setupTest() {
this.handle = this.adaptor.startTest();
}
testAddRecord() {
let record:ChangeRecord = {
id: 'dsf',
test: 'a',
test2: 2,
test3: true,
test4: {a: 'b'}
};
this.handle.addChangeRecord(record);
}
}