예제 #1
0
        public void TestValidUserWithoutPermissions()
        {
            var ats            = _integrationQuery.GetIntegrationSystem <Ats>(_jobG8Query.GetIntegratorUser().IntegrationSystemId);
            var integratorUser = new IntegratorUser
            {
                LoginId             = "JobAdFeedTestUser",
                PasswordHash        = LoginCredentials.HashToString(Password),
                Permissions         = IntegratorPermissions.GetJobApplication,
                IntegrationSystemId = ats.Id,
            };

            _integrationCommand.CreateIntegratorUser(integratorUser);

            var request = new PostAdvertRequestMessage
            {
                UserCredentials = new Credentials
                {
                    Username = "******",
                    Password = Password
                }
            };

            var employer = CreateEmployer(0);

            PostAdvert(employer, request);
        }
예제 #2
0
        public static IntegratorUser CreateTestIntegratorUser(this IIntegrationCommand integrationCommand, string loginId, string password, IntegratorPermissions permissions)
        {
            var system = new Ats {
                Name = loginId + " Integration System"
            };

            integrationCommand.CreateIntegrationSystem(system);

            var user = new IntegratorUser {
                LoginId = loginId, PasswordHash = HashToString(password), Permissions = permissions, IntegrationSystemId = system.Id
            };

            integrationCommand.CreateIntegratorUser(user);

            return(user);
        }