Exemplo n.º 1
0
 public void test_no_subscribers()
 {
     readedText = "";
     var publisher = new Publisher();
     publisher.Publish("test");
     readedText.Should().Be("");
 }
Exemplo n.º 2
0
Arquivo: Main.cs Projeto: itwymt/Kata5
 private static void Main(string[] args)
 {
     var publisher = new Publisher();
     var subsriberCreator = new SubscriberCreator(publisher);
     var commandProcessor = new CommandProcessor(publisher, subsriberCreator, Console.In);
     commandProcessor.SubscribeAndReadText();
     Console.ReadLine();
 }
Exemplo n.º 3
0
 public void test_read_text()
 {
     readedText = "";
     var publisher = new Publisher();
     publisher.WriteEvent += HandlePublisherEvent;
     publisher.Publish("lhyiuyo,ddddd,dddddd");
     readedText.Should().Be("lhyiuyo,ddddd,dddddd");
 }
Exemplo n.º 4
0
 public void test_read_text1()
 {
     readedText = "";
     var publisher = new Publisher();
     publisher.WriteEvent += HandlePublisherEvent;
     publisher.Publish(null);
     readedText.Should().Be("");
 }
Exemplo n.º 5
0
        private static void Main(string[] args)
        {
            var publisher = new Publisher(Console.In);
            var subsriber = new Subscriber(publisher, Console.Out);

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