Ejemplo n.º 1
0
        public override void Setup()
        {
            _logger = Substitute.For <ILogger <ILearnerServiceApiClient> >();
            _learnerPortTypeClient = Substitute.For <ILearnerPortTypeClient>();

            _registrationLearnerDetails = new RegisteredLearnerDetails
            {
                Uln         = 1234567890,
                Firstname   = "First 1",
                Lastname    = "Last 1",
                DateofBirth = DateTime.UtcNow.AddYears(-30)
            };

            _configuration = new ResultsAndCertificationConfiguration
            {
                LearningRecordServiceSettings = new LearningRecordServiceSettings {
                    VendorId = 1, Ukprn = "9856741231", Username = "******", Password = "******"
                }
            };

            _mockHttpResult = new findLearnerByULNResponse
            {
                FindLearnerResponse = new FindLearnerResp
                {
                    ULN        = _registrationLearnerDetails.Uln.ToString(),
                    GivenName  = _registrationLearnerDetails.Firstname,
                    FamilyName = _registrationLearnerDetails.Lastname,
                    Learner    = new List <Learner> {
                        new Learner
                        {
                            ULN        = _registrationLearnerDetails.Uln.ToString(),
                            GivenName  = _registrationLearnerDetails.Firstname,
                            FamilyName = _registrationLearnerDetails.Lastname,
                            Gender     = ((int)LrsGender.Male).ToString()
                        }
                    }.ToArray(),
                    ResponseCode = Constants.LearnerByUlnExactMatchResponseCode
                }
            };
        }
Ejemplo n.º 2
0
 public LearnerServiceClient(ILogger <LearnerServiceClient> logger, ILearnerPortTypeClient learnerQueryPortTypeClient, ResultsAndCertificationConfiguration configuration)
 {
     _logger = logger;
     _learnerPortTypeClient = learnerQueryPortTypeClient;
     _configuration         = configuration;
 }