示例#1
0
        public void FailedGetAllEmployeeDetailRequestReturnsNoEmployees()
        {
            var peopleHrUsers = PeopleHrService.GetAllEmployeeDetail(new GetAllEmployeeDetailRequest
            {
                APIKey         = "",
                IncludeLeavers = false
            });

            Assert.IsTrue(peopleHrUsers.Result == null);
        }
示例#2
0
        public void SuccessfulGetAllEmployeeDetailRequestReturnsEmployees()
        {
            var peopleHrUsers = PeopleHrService.GetAllEmployeeDetail(new GetAllEmployeeDetailRequest
            {
                APIKey         = ApiKey,
                IncludeLeavers = false
            });

            Assert.IsTrue(peopleHrUsers.Result.Any());
        }
示例#3
0
        public void FailedGetNextYearHolidayEntitlementReturnsNoHolidayEntitlements()
        {
            var peopleHrUsers = PeopleHrService.GetAllEmployeeDetail(new GetAllEmployeeDetailRequest
            {
                APIKey         = ApiKey,
                IncludeLeavers = false
            });

            var peopleHrUser = PeopleHrService.GetNextYearHolidayEntitlement(new GetHolidayEntitlementRequest()
            {
                APIKey     = "",
                EmployeeId = peopleHrUsers.Result.First().EmployeeId.DisplayValue,
            });

            Assert.IsTrue(peopleHrUser.Result == null);
        }
示例#4
0
        public void FailedGetEmployeeDetailByIdRequestReturnsNoEmployee()
        {
            var peopleHrUsers = PeopleHrService.GetAllEmployeeDetail(new GetAllEmployeeDetailRequest
            {
                APIKey         = ApiKey,
                IncludeLeavers = false
            });

            var peopleHrUser = PeopleHrService.GetEmployeeDetailById(new GetEmployeeDetailByIdRequest
            {
                APIKey     = "",
                EmployeeId = peopleHrUsers.Result.First().EmployeeId.DisplayValue
            });

            Assert.IsTrue(peopleHrUser.Result == null);
        }
        public void SuccessfulGetAllDocumentReturnsDocuments()
        {
            var peopleHrUsers = PeopleHrService.GetAllEmployeeDetail(new GetAllEmployeeDetailRequest
            {
                APIKey         = ApiKey,
                IncludeLeavers = false
            });

            var peopleHrUser = PeopleHrService.GetAllDocument(new GetAllDocumentRequest
            {
                APIKey     = ApiKey,
                EmployeeId = peopleHrUsers.Result.First().EmployeeId.DisplayValue
            });

            Assert.IsTrue(peopleHrUser.Result != null);
        }
示例#6
0
        public void FailedGetHistoryByEmployeeIdAndFieldNameReturnsNoFieldHistorys()
        {
            var peopleHrUsers = PeopleHrService.GetAllEmployeeDetail(new GetAllEmployeeDetailRequest
            {
                APIKey         = ApiKey,
                IncludeLeavers = false
            });

            var peopleHrUser = PeopleHrService.GetHistoryByEmployeeIdAndFieldName(new GetHistoryByEmployeeIdAndFieldNameRequest
            {
                APIKey     = "",
                EmployeeId = peopleHrUsers.Result.First().EmployeeId.DisplayValue,
                FieldName  = FieldWithHistory.EMPLOYEE_CONTACT_INFORMATION_ADDRESS
            });

            Assert.IsTrue(peopleHrUser.Result == null);
        }
示例#7
0
        public void FailedGetHolidayEntitlementReturnsNoHolidayEntitlements()
        {
            var peopleHrUsers = PeopleHrService.GetAllEmployeeDetail(new GetAllEmployeeDetailRequest
            {
                APIKey         = ApiKey,
                IncludeLeavers = false
            });

            var peopleHrUser = PeopleHrService.GetHolidayEntitlement(new GetHolidayEntitlementRequest()
            {
                APIKey     = "",
                EmployeeId = peopleHrUsers.Result.First().EmployeeId.DisplayValue,
                StartDate  = DateTime.Now.AddYears(-1).ToString("yyyy-MM-dd"),
                EndDate    = DateTime.Now.ToString("yyyy-MM-dd")
            });

            Assert.IsTrue(peopleHrUser.Result == null);
        }
示例#8
0
        public void SuccessfulGetAbsenceDetailReturnsAbsences()
        {
            var peopleHrUsers = PeopleHrService.GetAllEmployeeDetail(new GetAllEmployeeDetailRequest
            {
                APIKey         = ApiKey,
                IncludeLeavers = false
            });

            var peopleHrUser = PeopleHrService.GetAbsenceDetail(new GetAbsenceDetailRequest()
            {
                APIKey     = ApiKey,
                EmployeeId = peopleHrUsers.Result.First().EmployeeId.DisplayValue,
                StartDate  = DateTime.Now.AddYears(-1).ToString("yyyy-MM-dd"),
                EndDate    = DateTime.Now.ToString("yyyy-MM-dd")
            });

            Assert.IsTrue(peopleHrUser.Result != null);
        }