eventric-testing
Version:
Testing helpers for eventric.js
24 lines (17 loc) • 568 B
JavaScript
var AggregateFactory, eventric;
eventric = require('eventric');
AggregateFactory = (function() {
function AggregateFactory() {}
AggregateFactory.prototype.createAggregateInstance = function(context, aggregateName) {
context;
context = eventric.context(Math.random());
context.defineDomainEvents(domainEvents);
context.addAggregate('test', AggregateClass);
context.addCommandHandlers({
CreateAggregate: function() {}
});
return aggregate.instance;
};
return AggregateFactory;
})();
module.exports = new AggregateFactory;