strongloop/loopback-testing — pull request #2 by bajtos (2013-12-11 18:31:00+00:00)
Title: Implement TestDataBuilder

Usage:
```js
// The context object to hold the created models.
// You can use `this` in mocha test instead.
var context = {};

var ref = TestDataBuilder.ref;
new TestDataBuilder()
.define('application', Application, {
pushSettings: { stub: { } }
})
.define('device', Device, {
appId: ref('application.id'),
deviceType: 'android'
})
.define('notification', Notification)
.buildTo(context, function(err) {
// test models are available as
// context.application
// context.device
// context.notification
});
```

/to: @raymondfeng @ritch Please review.
/cc: @rmg @Schoonology

Related discussions in loopback-push-notification: [what values to use as default](https://github.com/strongloop/loopback-push-notification/commit/ca8af230538982a5d15e369061ee49aeac3d7190#commitcomment-4826513), [what types to support](https://github.com/strongloop/loopback-push-notification/commit/ca8af230538982a5d15e369061ee49aeac3d7190#commitcomment-4826524).