Example #1
0
        public async Task LmiImportOrchestrationTriggerGetJobProfileSocMappingsActivityIsSuccessful()
        {
            // Arrange
            const int mappingItemsCount = 2;
            var       dummyMappings     = A.CollectionOfDummy <SocJobProfileMappingModel>(mappingItemsCount);

            A.CallTo(() => fakeJobProfileService.GetMappingsAsync()).Returns(dummyMappings);

            // Act
            var results = await lmiImportOrchestrationTrigger.GetJobProfileSocMappingsActivity(null).ConfigureAwait(false);

            // Assert
            A.CallTo(() => fakeJobProfileService.GetMappingsAsync()).MustHaveHappenedOnceExactly();
            Assert.Equal(dummyMappings, results);
        }
        public async Task <IList <SocJobProfileMappingModel>?> GetJobProfileSocMappingsActivity([ActivityTrigger] string?name)
        {
            logger.LogInformation("Getting Job profile to SOC mappings");

            return(await jobProfileService.GetMappingsAsync().ConfigureAwait(false));
        }