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

            Assert.NotNull(bus);
            Assert.IsType <ReactiveBus>(bus);
        }
예제 #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();
            }
        }
예제 #3
0
 public void Register_ShouldThrowArgumentException_WhenSubscribersEmpty()
 {
     Assert.Throws <ArgumentException>(() => PublisherFactory.Register(new List <ISubscriber>()));
 }
예제 #4
0
 public void Register_ShouldThrowArgumentNullException_WhenSubscribersIsNull()
 {
     Assert.Throws <ArgumentNullException>(() => PublisherFactory.Register(null));
 }