Exemple #1
0
        public void TDatenbank_Insert()
        {
            var dataAdapter = new Dataadapter();

            dataAdapter.DeletePersons();

            dataAdapter.InsertPerson(new Person {
                id = "1", Vorname = "T_Rex", Nachname = "Hans"
            });

            var result = dataAdapter.SelectPerson(1);

            Assert.IsNotNull(result);
        }
Exemple #2
0
        public void TDatenbank_SelectPersons()
        {
            var dataAdapter = new Dataadapter();

            dataAdapter.DeletePersons();

            dataAdapter.InsertPerson(new Person {
                id = "1", Vorname = "T_Rex", Nachname = "Hans"
            });
            dataAdapter.InsertPerson(new Person {
                id = "2", Vorname = "Müller", Nachname = "Max"
            });
            dataAdapter.InsertPerson(new Person {
                id = "3", Vorname = "Meier", Nachname = "Tom"
            });

            List <Person> result = dataAdapter.SelectPersons();

            Assert.AreEqual(3, result.Count);
        }