Beispiel #1
0
 public BufferingNotificationChannel(
     IBufferGovernor bufferGovernor,
     IBufferSelector <T> bufferSelector,
     INotificationPipeline notificationPipeline,
     INotificationSerializer notificationSerializer,
     IBufferedNotificationStore bufferedNotificationStore)
 {
     this.bufferGovernor            = bufferGovernor;
     this.bufferSelector            = bufferSelector;
     this.notificationPipeline      = notificationPipeline;
     this.notificationSerializer    = notificationSerializer;
     this.bufferedNotificationStore = bufferedNotificationStore;
 }
        public BufferingNotificationChannelTests()
        {
            bufferGovernor = Substitute.For <IBufferGovernor>();
            bufferGovernor.Id.Returns(Guid.NewGuid());
            bufferSelector       = Substitute.For <IBufferSelector <Notification1> >();
            notificationPipeline = Substitute.For <INotificationPipeline>();
            notificationPipeline.Id.Returns(Guid.NewGuid());
            notificationSerializer    = Substitute.For <INotificationSerializer>();
            bufferedNotificationStore = Substitute.For <IBufferedNotificationStore>();

            FakeClock.Setup();

            sut = new BufferingNotificationChannel <Notification1>(bufferGovernor,
                                                                   bufferSelector, notificationPipeline, notificationSerializer,
                                                                   bufferedNotificationStore);
        }