コード例 #1
0
        public void Constructor_add_all_sources()
        {
            _compositeSource = new CompositeHandlerSource(new[]{_firstSource, _secondSource});

            var firstHandler = new TestHandler();
            var secondHandler = new TestHandler();

            _firstSource.Subscribe(firstHandler);
            _secondSource.Subscribe(secondHandler);

            var handlers = GetListenersFromCompositeSource();

            handlers.Satisfy(list =>
                              list.Contains(firstHandler) &&
                              list.Contains(secondHandler));
        }
コード例 #2
0
        public void SetUp()
        {
            _compositeSource = new CompositeHandlerSource();

            _firstSource = new SimpleSubscriber();
            _secondSource = new SimpleSubscriber();

            _compositeSource.AddSource(_firstSource);
            _compositeSource.AddSource(_secondSource);
        }