Exemplo n.º 1
0
 public LeaveRequestTests()
 {
     _servicesFixture    = new ServicesFixture();
     _leaveService       = _servicesFixture.Get <LeaveService>();
     _orgGroupRepository = _servicesFixture.Get <OrgGroupRepository>();
     _dbConnection       = _servicesFixture.Get <IDbConnection>();
     _servicesFixture.SetupPeople();
 }
Exemplo n.º 2
0
 public RoleTests()
 {
     _servicesFixture = new ServicesFixture(collection =>
                                            collection.Replace(ServiceDescriptor.Singleton <IEntityService, EntityService>()));
     _db            = _servicesFixture.DbConnection;
     _personService = _servicesFixture.Get <PersonService>();
 }
Exemplo n.º 3
0
        public void CanGetTemplateSettings()
        {
            var options = _servicesFixture.Get <IOptions <TemplateSettings> >();

            options.ShouldNotBeNull();
            options.Value.NotifyHrLeaveRequest.ShouldNotBeNull();
        }
Exemplo n.º 4
0
        public void GetHrAdminsReturnsUsers()
        {
            var personAdmin   = _servicesFixture.InsertPerson();
            var personHrStaff = _servicesFixture.InsertPerson();
            var hrAdmin       = _servicesFixture.InsertUser(u => u.PersonId = personAdmin.Id, "hradmin");
            var nonHrAdmin    = _servicesFixture.InsertUser(u => u.PersonId = personHrStaff.Id, "hr");
            var actualStaff   = _servicesFixture.Get <PersonRepository>().GetHrAdminStaff().Single();

            Assert.Equal(personAdmin.Id, actualStaff.Id);
        }
Exemplo n.º 5
0
 public LeaveCalculationsTests()
 {
     _servicesFixture = new ServicesFixture();
     _servicesFixture.SetupData();
     _leaveService = _servicesFixture.Get <LeaveService>();
 }
Exemplo n.º 6
0
 public MiscTests()
 {
     _servicesFixture  = new ServicesFixture();
     _personRepository = _servicesFixture.Get <PersonRepository>();
 }
Exemplo n.º 7
0
 public JobTests()
 {
     _sf = new ServicesFixture();
     _js = _sf.Get <JobService>();
 }
Exemplo n.º 8
0
 public TrainingTests()
 {
     _sf   = new ServicesFixture();
     _repo = _sf.Get <TrainingRepository>();
 }