public void FindByIdThrowsExceptionIfNoUserIsFound() { var pDb = new PeopleDatabase(); Assert.That(() => pDb.FindById(5), Throws.InvalidOperationException); }
public void FindByIdWhenIdNotPresent() { var db = new PeopleDatabase(); db.Add(new Person(11, "Pesho")); Assert.That(() => db.FindById(1), Throws.InvalidOperationException); }
public void TestValidFindById() { var person = new Person(12, "Pesho"); var db = new PeopleDatabase(); db.Add(person); Assert.That(person, Is.EqualTo(db.FindById(12))); }
public void FindByIdWhenValid() { var db = new PeopleDatabase(); var person = new Person(11, "Pesho"); db.Add(person); Assert.That(db.FindById(11), Is.EqualTo(person)); }
public void FindByIdWhenArgumentIsNegative() { var db = new PeopleDatabase(); Assert.That(() => db.FindById(-5), Throws.ArgumentException); }