static void Main(string[] args) { string pro_key = "profi"; string exp_key = "expert"; string pro, exp; Console.WriteLine("Введите ключ для версии Про:"); pro = Console.ReadLine(); if (pro != pro_key) { DocumentWorker user1 = new DocumentWorker(); Console.WriteLine("document status:"); user1.OpenDocument(); user1.EditDocument(); user1.SaveDocument(); } else { Console.WriteLine("Введите ключ для версии Эксперт:"); exp = Console.ReadLine(); if (exp != exp_key) { ExpertDocumentWorker user1 = new ExpertDocumentWorker(); Console.WriteLine("document status:"); user1.OpenDocument(); user1.EditDocument(); user1.SaveDocument(); } else { ProDocumentWorker user1 = new ProDocumentWorker(); Console.WriteLine("document status:"); user1.OpenDocument(); user1.EditDocument(); user1.SaveDocument(); } } }
public void EditDocumentTest() { Assert.AreEqual("Документ отредактирован", _target.EditDocument()); }