Ejemplo n.º 1
0
        public void TestGetAllParentAccountParties()
        {
            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.GetAllParentAccountParties(post.Id);

                Assert.AreEqual(1, posts.Count());
            }
        }