Skip to content

Commit

Permalink
Merge pull request #38 from marcduiker/develop
Browse files Browse the repository at this point in the history
Fixed Mock setup for the changed type of the SetCustomStatus
  • Loading branch information
marcduiker committed Aug 17, 2020
2 parents 41eea53 + ab65f5b commit ce28556
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static Mock<IDurableOrchestrationContext> BuildWithoutHistoryAndWithGitHu
It.Is<RepositoryRelease>(r => r.RepositoryName.Equals(repository1Name))))
.ReturnsAsync(gitHubRepositoryReleaseRepo1);

mockContext.Setup(c => c.SetCustomStatus(It.IsAny<LatestReleases>()));
mockContext.Setup(c => c.SetCustomStatus(It.IsAny<string>()));

mockContext
.Setup(c => c.CallActivityWithRetryAsync<RepositoryRelease>(
Expand Down Expand Up @@ -150,7 +150,7 @@ public static Mock<IDurableOrchestrationContext> BuildWithoutHistoryAndGitHubRet
It.Is<RepositoryConfiguration>(r => r.RepositoryName.Equals(repository2Name))))
.ReturnsAsync(RepositoryReleaseBuilder.BuildNullRelease<HistoryRepositoryRelease>(repository2Name));

mockContext.Setup(c => c.SetCustomStatus(It.IsAny<LatestReleases>()));
mockContext.Setup(c => c.SetCustomStatus(It.IsAny<string>()));

// Setup SaveLatestRelease
mockContext
Expand Down Expand Up @@ -221,7 +221,7 @@ public static Mock<IDurableOrchestrationContext> BuildWithHistoryAndWithGitHubWi
It.Is<RepositoryConfiguration>(r => r.RepositoryName.Equals(repository2Name))))
.ReturnsAsync(RepositoryReleaseBuilder.BuildOneWithReleaseId<HistoryRepositoryRelease>(repository2Name, releaseIdRepo2));

mockContext.Setup(c => c.SetCustomStatus(It.IsAny<LatestReleases>()));
mockContext.Setup(c => c.SetCustomStatus(It.IsAny<string>()));

return mockContext;
}
Expand Down Expand Up @@ -281,7 +281,7 @@ public static Mock<IDurableOrchestrationContext> BuildWithHistoryAndWithGitHubWi
It.Is<RepositoryConfiguration>(r => r.RepositoryName.Equals(repository2Name))))
.ReturnsAsync(RepositoryReleaseBuilder.BuildOneWithReleaseId<HistoryRepositoryRelease>(repository2Name, releaseIdHistoryRepo2));

mockContext.Setup(c => c.SetCustomStatus(It.IsAny<LatestReleases>()));
mockContext.Setup(c => c.SetCustomStatus(It.IsAny<string>()));

// Setup SaveLatestRelease
mockContext
Expand Down Expand Up @@ -337,7 +337,7 @@ public static Mock<IDurableOrchestrationContext> BuildWithHistoryAndWithGitHubWi
It.Is<RepositoryConfiguration>(r => r.RepositoryName.Equals(repository1Name))))
.ReturnsAsync(RepositoryReleaseBuilder.BuildOneWithReleaseId<HistoryRepositoryRelease>(repository1Name, releaseIdHistoryRepo1));

mockContext.Setup(c => c.SetCustomStatus(It.IsAny<LatestReleases>()));
mockContext.Setup(c => c.SetCustomStatus(It.IsAny<string>()));

// Setup SaveLatestRelease, throws
mockContext
Expand Down

0 comments on commit ce28556

Please sign in to comment.