public void AddAndSearchContactTest() { ObjectMother.Reset(); ObjectMother.CommandFactory.GetCommand("добавить 9090287694 Бабушка").Do("добавить 9090287694 Бабушка"); ObjectMother.CommandFactory.GetCommand("Найти Бабушка").Do("Найти Бабушка"); Assert.That(ObjectMother.Loop.Lines.Any(l => l.Contains("Бабушка"))); }
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")); }
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("Скорая"))); }
public void ExitFromProgramTest() { ObjectMother.Reset(); ObjectMother.CommandFactory.GetCommand("Выход").Do("Выход"); Assert.That(ObjectMother.Loop.KeyIsAwaited); }
public void UnknownCommandTest() { ObjectMother.Reset(); ObjectMother.CommandFactory.GetCommand("fhfjh48494").Do("fhfjh48494"); Assert.That(ObjectMother.Loop.Lines.Any()); }