public void ConsoleMessageRepositoryTest() { var repo = new ConsoleMessageRepository(); var message = repo.GetMessage(); Assert.AreEqual(message, ExpectedResult); }
public ActionResult Message() { var model = new ConsoleMessageModel(); model.ConsoleMessages = ConsoleMessageRepository.GetAll(); return(View(model)); }
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(); }