public async Task WebhooksDeleteServiceProcessDeleteForMessageContentTypeSharedContentItemReturnsSuccess() { // Arrange const HttpStatusCode expectedResult = HttpStatusCode.OK; A.CallTo(() => fakeContentItemDocumentService.DeleteAsync(A <Guid> .Ignored)).Returns(true); // Act var result = await webhooksDeleteService.ProcessDeleteAsync(Guid.NewGuid(), Guid.NewGuid(), MessageContentType.SharedContentItem).ConfigureAwait(false); // Assert A.CallTo(() => fakeContentItemDocumentService.DeleteAsync(A <Guid> .Ignored)).MustHaveHappenedOnceExactly(); A.CallTo(() => fakeJobGroupCacheRefreshService.PurgeAsync()).MustNotHaveHappened(); A.CallTo(() => fakeJobGroupCacheRefreshService.DeleteAsync(A <Guid> .Ignored)).MustNotHaveHappened(); Assert.Equal(expectedResult, result); }
public async Task <HttpStatusCode> PurgeSocAsync() { var result = await jobGroupCacheRefreshService.PurgeAsync().ConfigureAwait(false); return(result ? HttpStatusCode.OK : HttpStatusCode.NoContent); }