public async Task GraphServicePurgeSocAsyncReturnsSuccess() { // arrange A.CallTo(() => fakeGraphConnector.BuildPurgeCommandsForInitialKey(A <string> .Ignored)).Returns(A.CollectionOfDummy <string>(2)); // act await graphService.PurgeSocAsync(1234, GraphReplicaSet.Draft).ConfigureAwait(false); // assert A.CallTo(() => fakeGraphConnector.BuildPurgeCommandsForInitialKey(A <string> .Ignored)).MustHaveHappenedOnceExactly(); A.CallTo(() => fakeGraphConnector.RunAsync(A <IList <string> > .Ignored, A <GraphReplicaSet> .Ignored)).MustHaveHappenedOnceExactly(); Assert.True(true); }
public async Task PurgeSocAsync(int soc) { logger.LogInformation($"Purging Graph of LMI data for SOC {soc}"); var commands = graphConnector.BuildPurgeCommandsForInitialKey(soc.ToString(CultureInfo.InvariantCulture)); logger.LogInformation($"Purging Graph of LMI data for SOC {soc}: executing commands"); await graphConnector.RunAsync(commands).ConfigureAwait(false); logger.LogInformation($"Purged Graph of LMI data for SOC {soc}"); }