public async override Task TestUpdateAsync() { int communityId = 2; Community community = await communityDao.FindByIdAsync(communityId); community.Name = "CommunityUpdate"; Assert.IsTrue(await communityDao.UpdateAsync(community)); Community test = await communityDao.FindByIdAsync(communityId); Assert.IsTrue(test.Equals(community)); }
public async override Task TestInsertAsync() { using (var transaction = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled)) { int communityId = 3; Community community = new Community { DistrictId = 2, CommunityId = communityId, Name = "TestCommunity2" }; await communityDao.InsertAsync(community); Community test = await communityDao.FindByIdAsync(communityId); Assert.IsTrue(test.Equals(community)); } }