public async Task ThenItShouldHaveEnqueuedALearningStandardsSyncJobWithOdsInstanceId() { // Act var _ = await SystemUnderTest.UpdateLearningStandards(); // Assert Func <LearningStandardsJobContext, bool> learningStandardsJobEnqueueVerifier = actual => { actual.ShouldSatisfyAllConditions( () => actual.ApiUrl.ShouldBe(ProductionUrl), () => actual.OdsInstanceId.ShouldBe(_instanceContext.Id) ); return(true); }; LearningStandardsJob.Verify( x => x.EnqueueJob(It.Is <LearningStandardsJobContext>(y => learningStandardsJobEnqueueVerifier(y))), Times.Once); }
public async Task ThenItShouldHaveEnqueuedALearningStandardsSyncJobWithoutYear() { // Act var _ = await SystemUnderTest.LearningStandards(_learningStandardsModel); // Assert Func <LearningStandardsJobContext, bool> learningStandardsJobEnqueueVerifier = actual => { actual.ShouldSatisfyAllConditions( () => actual.ApiUrl.ShouldBe(ProductionUrl), () => actual.SchoolYear.ShouldBeNull() ); return(true); }; LearningStandardsJob.Verify( x => x.EnqueueJob(It.Is <LearningStandardsJobContext>(y => learningStandardsJobEnqueueVerifier(y))), Times.Once); }
public async Task ThenItShouldHaveEnqueuedALearningStandardsSyncJobWithYear() { // Act var _ = await SystemUnderTest.UpdateLearningStandards(); // Assert Func <LearningStandardsJobContext, bool> learningStandardsJobEnqueueVerifier = actual => { actual.ShouldSatisfyAllConditions( () => actual.Environment.ShouldBe(CloudOdsEnvironment.Production.Value), () => actual.ApiUrl.ShouldBe(ProductionUrl), () => actual.SchoolYear.ShouldBe(Year) ); return(true); }; LearningStandardsJob.Verify( x => x.EnqueueJob(It.Is <LearningStandardsJobContext>(y => learningStandardsJobEnqueueVerifier(y))), Times.Once); }