public void TestGetAllChildAccountParties() { using (UnitOfWork unitwork = new UnitOfWork(store, dbContextFactory)) { IRepository<Party, Guid> partyRepository = new Repository<Party, Guid>(store); PartyService partyService = new PartyService(); Party post = partyRepository.Query(s => s.Name == "總經理室主管").First(); var posts = partyService.GetAllChildAccountParties(post.Id); Assert.AreEqual(1, posts.Count()); } }