Esempio n. 1
0
        public async override Task TestFindAllAsync()
        {
            using (var transaction = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
            {
                int communityId = 1;

                Address address = new Address
                {
                    AddressId   = 2,
                    CommunityId = communityId,
                    Location    = "TestLocation2",
                    Zip         = "124"
                };

                Address address2 = new Address
                {
                    AddressId   = 3,
                    CommunityId = communityId,
                    Location    = "TestLocation3",
                    Zip         = "124"
                };

                await addressDao.InsertAsync(address);

                await addressDao.InsertAsync(address2);

                IEnumerable <Address> addresses = await addressDao.FindAllAsync();

                CollectionAssert.Contains(addresses.ToList(), address);
                CollectionAssert.Contains(addresses.ToList(), address2);
            }
        }