예제 #1
0
파일: Tests.cs 프로젝트: itwymt/Kata5
 public void test_no_subscribers()
 {
     readedText = "";
     var publisher = new Publisher();
     publisher.Publish("test");
     readedText.Should().Be("");
 }
예제 #2
0
파일: Main.cs 프로젝트: 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();
 }
예제 #3
0
파일: Tests.cs 프로젝트: itwymt/Kata5
 public void test_read_text()
 {
     readedText = "";
     var publisher = new Publisher();
     publisher.WriteEvent += HandlePublisherEvent;
     publisher.Publish("lhyiuyo,ddddd,dddddd");
     readedText.Should().Be("lhyiuyo,ddddd,dddddd");
 }
예제 #4
0
파일: Tests.cs 프로젝트: itwymt/Kata5
 public void test_read_text1()
 {
     readedText = "";
     var publisher = new Publisher();
     publisher.WriteEvent += HandlePublisherEvent;
     publisher.Publish(null);
     readedText.Should().Be("");
 }
예제 #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();
        }