示例#1
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();
 }
示例#2
0
        public void test_create_subscriber()
        {
            var publisher  = Substitute.For <IPublisher>();
            var sc         = new SubscriberCreator(publisher);
            var sw         = new StringWriter(new StringBuilder());
            var subscriber = sc.CreateSubscriber(sw, publisher);

            subscriber.Should().BeOfType <Subscriber>();
        }
示例#3
0
文件: Tests.cs 项目: itwymt/Kata5
 public void test_create_subscriber()
 {
     var publisher = Substitute.For<IPublisher>();
     var sc = new SubscriberCreator(publisher);
     var sw = new StringWriter(new StringBuilder());
     var subscriber = sc.CreateSubscriber(sw);
     subscriber.Should().BeOfType<Subscriber>();
 }