Beispiel #1
0
        public void GetDataT()
        {
            SetupData();

            List <Person> personList =
                _sqliteConnector.GetData <Person>("SELECT PersId, Firstname, Lastname, Birthday FROM Person");

            Assert.IsTrue(personList != null);
            Assert.IsTrue(personList.Count == 3);

            List <Address> addressList =
                _sqliteConnector.GetData <Address>("SELECT AddressId, Street, HouseNumber, Zipcode, City FROM Address");

            Assert.IsTrue(addressList != null);
            Assert.IsTrue(addressList.Count == 3);

            List <PersonWithAddress> personWithAddressList =
                _sqliteConnector.GetData <PersonWithAddress>(
                    "SELECT p.PersId AS PersId, Firstname, Lastname, Birthday, Street, HouseNumber, Zipcode, City FROM Person p, Address a WHERE p.PersId = a.PersId");

            Assert.IsTrue(personWithAddressList != null);
            Assert.IsTrue(personWithAddressList.Count == 3);
        }