public void AddMethodTest(Person person) { ExtendDatabase db = new ExtendDatabase(); db.Add(person); Assert.That(db.Fetch(), Is.EqualTo(new Person[] { person })); }
public void TestConstructor_NoArray() { ExtendDatabase db = new ExtendDatabase(new Person(1, "Ivcho_55"), new Person(2, "Nasko_123")); Person[] result = db.Fetch(); Assert.That(result.FirstOrDefault().Username, Is.EqualTo("Ivcho_55")); }
public void TestConstructor() { Person[] people = new Person[2] { new Person(1, "Ivcho_55"), new Person(2, "Nasko_123") }; ExtendDatabase db = new ExtendDatabase(people); Assert.That(db.Fetch(), Is.EqualTo(people)); }
public void FetchMethodTest() { ExtendDatabase db = new ExtendDatabase(new Person(1, "Ivcho_55"), new Person(2, "Ivcho_1255"), new Person(3, "Ivcho_55325")); db.Add(new Person(4, "IvanchoGolemeca")); db.Remove(); db.Remove(); db.Remove(); db.Remove(); Assert.That(db.Fetch(), Is.EquivalentTo(new Person[] { })); }
public void RemoveTest() { Person[] people = new Person[1] { new Person(1, "Ivcho_55") }; ExtendDatabase db = new ExtendDatabase(people); db.Remove(); Assert.That(db.Fetch(), Is.EqualTo(new Person[] { })); }
public void TestConstructor_NoParameters() { ExtendDatabase db = new ExtendDatabase(); Assert.That(db.Fetch(), Is.EqualTo(new Person[] { })); }