示例#1
0
        public void ConsoleMessageRepositoryTest()
        {
            var repo    = new ConsoleMessageRepository();
            var message = repo.GetMessage();

            Assert.AreEqual(message, ExpectedResult);
        }
示例#2
0
        public ActionResult Message()
        {
            var model = new ConsoleMessageModel();

            model.ConsoleMessages = ConsoleMessageRepository.GetAll();

            return(View(model));
        }
示例#3
0
        private static void Main()
        {
            var writerType = ConfigurationManager.AppSettings["MessageWriter"];

            var writer = new WriterService().GetWriter(writerType);

            var repository = new ConsoleMessageRepository(writer);

            repository.WriteMessage();

            System.Console.ReadLine();
        }