Ejemplo n.º 1
0
        public void TestGetParentOrganization()
        {
            using (UnitOfWork unitwork = new UnitOfWork(store, dbContextFactory))
            {
                IRepository<Organization, Guid> organRepository = new Repository<Organization, Guid>(store);
                OrganizationService organizationService = new OrganizationService();

                ICollection<Organization> parents = organizationService.GetParentOrganizations(organRepository.Query(s => s.Name == "人資部").First().Id);
                Assert.AreEqual(1, parents.Count);
                Assert.AreEqual("總經理室", parents.First().Name);
            }
        }