Пример #1
0
        public void AssertIndustryPlacement(IndustryPlacement actualIndustryPlacement, IndustryPlacement expectedIndustryPlacement)
        {
            if (expectedIndustryPlacement == null)
            {
                actualIndustryPlacement.Should().BeNull();
                return;
            }

            actualIndustryPlacement.TqRegistrationPathwayId.Should().Be(expectedIndustryPlacement.TqRegistrationPathwayId);
            actualIndustryPlacement.Status.Should().Be(expectedIndustryPlacement.Status);
            actualIndustryPlacement.CreatedBy.Should().Be(expectedIndustryPlacement.CreatedBy);
        }
        public static IndustryPlacement CreateIndustryPlacement(ResultsAndCertificationDbContext _dbContext, int tqRegistrationPathwayId, IndustryPlacementStatus status, bool addToDbContext = true)
        {
            var qualificationAchieved = new IndustryPlacement
            {
                TqRegistrationPathwayId = tqRegistrationPathwayId,
                Status = status
            };

            if (addToDbContext)
            {
                _dbContext.Add(qualificationAchieved);
            }
            return(qualificationAchieved);
        }
        public static IndustryPlacement CreateIndustryPlacement(ResultsAndCertificationDbContext _dbContext, IndustryPlacement industryPlacement, bool addToDbContext = true)
        {
            if (industryPlacement == null)
            {
                industryPlacement = new IndustryPlacementBuilder().Build();
            }

            if (addToDbContext)
            {
                _dbContext.Add(industryPlacement);
            }
            return(industryPlacement);
        }