public EventSourceConverter(
     IChangeDetector <TGeometry, TAttributes> changeDetector,
     IEventStoreApi <Feature <TGeometry, TAttributes>, FeatureDiff> eventStoreApi,
     IMessageBus <FeatureDiff> messageBus)
 {
     _changeDetector = changeDetector;
     _eventStoreApi  = eventStoreApi;
     _messageBus     = messageBus;
 }
        public void Setup()
        {
            _eventStoreApi = A.Fake <IEventStoreApi <Feature <Polygon, ExampleAttributes>, FeatureDiff> >();
            var messageBus = new MessageBus <FeatureDiff>();

            _messageBus = A.Fake <IMessageBus <FeatureDiff> >(x => x.Wrapping(messageBus));

            _databaseEngine       = A.Fake <IDatabaseEngine>();
            _readProjectionWriter = new ReadProjectionWriter <Polygon, ExampleAttributes, Polygon, ExampleAttributes>(_messageBus, _databaseEngine, _eventStoreApi, PassTrough);

            _readProjectionWriterWithTransform = new ReadProjectionWriter <Polygon, ExampleAttributes, Point, ExampleAttributes2>(_messageBus, _databaseEngine, _eventStoreApi, Transform);
            _readProjectionWriterWithFilter    = new ReadProjectionWriter <Polygon, ExampleAttributes, Polygon, ExampleAttributes>(_messageBus, _databaseEngine, _eventStoreApi, PassTrough, ExampleFilter);
        }
 public ReadProjectionWriter(
     IMessageBus <FeatureDiff> messageBus,
     IDatabaseEngine databaseEngine,
     IEventStoreApi <Feature <TInputGeometry, TInputAttributes>, FeatureDiff> eventStoreApi,
     Func <Feature <TInputGeometry, TInputAttributes>, Feature <TOutputGeometry, TOutputAttributes> > transformFeature,
     Func <Guid, Feature <TInputGeometry, TInputAttributes>, Task <bool> > shouldKeepFeature = null
     )
 {
     _messageBus        = messageBus;
     _databaseEngine    = databaseEngine;
     _eventStoreApi     = eventStoreApi;
     _transformFeature  = transformFeature;
     _shouldKeepFeature = shouldKeepFeature;
 }
 public void Setup()
 {
     _eventStoreApi = A.Fake <IEventStoreApi <Feature <LineString, ExampleAttributes>, FeatureDiff> >();
     _messageBus    = new MessageBus <FeatureDiff>();
     _converter     = new EventSourceConverter <LineString, ExampleAttributes>(_changeDetector, _eventStoreApi, _messageBus);
 }