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

                ICollection<Organization> allChilds = organizationService.GetAllChildOrganizations(organRepository.Query(s => s.Name == "總經理室").First().Id);
                Assert.AreEqual(3, allChilds.Count);
            }
        }