Example #1
0
        public void Register_ShouldRegisterAsReactiveBus()
        {
            var bus = PublisherFactory.Register(this.mockedSubscribers);

            Assert.NotNull(bus);
            Assert.IsType <ReactiveBus>(bus);
        }
Example #2
0
        public static void Main(string[] args)
        {
            var publisher = PublisherFactory
                            .Register(GetSubscribers())
                            .Build();

            var console = new Console();

            var app = new AppBuilder(publisher, console, PublisherName);

            while (true)
            {
                app.Run();
            }
        }
Example #3
0
 public void Register_ShouldThrowArgumentException_WhenSubscribersEmpty()
 {
     Assert.Throws <ArgumentException>(() => PublisherFactory.Register(new List <ISubscriber>()));
 }
Example #4
0
 public void Register_ShouldThrowArgumentNullException_WhenSubscribersIsNull()
 {
     Assert.Throws <ArgumentNullException>(() => PublisherFactory.Register(null));
 }