UNPKG

eventric-testing

Version:
24 lines (17 loc) 568 B
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;