public void TestValidFindingById(long id) { var values = new Person[] { new Person(1, "Pesho"), new Person(2123123123, "Gosho") }; var db = new ExtendedDatabase(values); var personFound = db.FindById(id); var expectedPerson = values.First(p => p.Id == id); Assert.That(personFound, Is.EqualTo(expectedPerson)); }
public void TestValidFindingByUsername(string username) { var values = new Person[] { new Person(1, "Pesho"), new Person(2, "Gosho") }; var db = new ExtendedDatabase(values); var personFound = db.FindByUsername(username); var expectedPerson = values.First(p => p.UserName == username); Assert.That(personFound, Is.EqualTo(expectedPerson)); }