Beispiel #1
0
 public void test_subsriber1()
 {
     var tp = Substitute.For<IPublisher>();
     var sb = new StringBuilder();
     var subscriber = new Subscriber(tp, new StringWriter(sb));
     tp.WriteEvent += Raise.Event<EventHandler<WriteEventArgs>>(this, new WriteEventArgs (""));
     sb.ToString().Should().Be("\r\n");
 }
Beispiel #2
0
        private static void Main(string[] args)
        {
            var publisher = new Publisher(Console.In);
            var subsriber = new Subscriber(publisher, Console.Out);

            publisher.ReadText();
            Console.ReadLine();
        }