public void ExtensionsWhenExtensionsAreClearedThenNoExtensionIsRegistered() { var executed = false; var extension = A.Fake <IExtension <string, int> >(); var testee = new StateContainer <string, int>(); testee.Extensions.Add(extension); testee.Extensions.Clear(); testee.ForEach(e => executed = true); executed .Should().BeFalse(); }
public async Task ExtensionsWhenExtensionsAreClearedThenNoExtensionIsRegistered() { var executed = false; var extension = A.Fake <IExtensionInternal <string, int> >(); var testee = new StateContainer <string, int>(); testee.Extensions.Add(extension); testee.Extensions.Clear(); await testee.ForEach(e => { executed = true; return(Task.CompletedTask); }) .ConfigureAwait(false); executed .Should().BeFalse(); }