Esempio n. 1
0
 public void AddAndSearchContactTest()
 {
     ObjectMother.Reset();
     ObjectMother.CommandFactory.GetCommand("добавить 9090287694 Бабушка").Do("добавить 9090287694 Бабушка");
     ObjectMother.CommandFactory.GetCommand("Найти Бабушка").Do("Найти Бабушка");
     Assert.That(ObjectMother.Loop.Lines.Any(l => l.Contains("Бабушка")));
 }
Esempio n. 2
0
 public void AddContactTest()
 {
     ObjectMother.Reset();
     ObjectMother.CommandFactory.GetCommand("Добавить 03 Скорая").Do("Добавить 03 Скорая");
     Assert.That(ObjectMother.Loop.Records.Any(r => r.Name == "Скорая"));
     Assert.That(ObjectMother.Loop.Records.Any(r => r.Phone == "03"));
 }
Esempio n. 3
0
        public void AddAndRemoveContactTest()
        {
            ObjectMother.Reset();
            ObjectMother.CommandFactory.GetCommand("Добавить 3434567859 Ростелеком").Do("Добавить 3434567859 Ростелеком");
            ObjectMother.CommandFactory.GetCommand("Удалить Ростелеком").Do("Удалить Ростелеком");
            Assert.That(ObjectMother.Loop.Lines.All(l => !l.Contains("Ростелеком")));

            ObjectMother.CommandFactory.GetCommand("Добавить 03 Скорая").Do("Добавить 03 Скорая");
            ObjectMother.CommandFactory.GetCommand("Удалить 03 Скорая").Do("Удалить 03 Скорая");
            Assert.That(ObjectMother.Loop.Lines.All(l => !l.Contains("Скорая")));
        }
Esempio n. 4
0
 public void ExitFromProgramTest()
 {
     ObjectMother.Reset();
     ObjectMother.CommandFactory.GetCommand("Выход").Do("Выход");
     Assert.That(ObjectMother.Loop.KeyIsAwaited);
 }
Esempio n. 5
0
 public void UnknownCommandTest()
 {
     ObjectMother.Reset();
     ObjectMother.CommandFactory.GetCommand("fhfjh48494").Do("fhfjh48494");
     Assert.That(ObjectMother.Loop.Lines.Any());
 }