public async Task StorageService_AddOrUpdatePluginsAsyncShouldCallAddOrupdate() { var document = GetDocument <Plugin>("mentorbot", "plugins"); await _service.AddOrUpdatePluginsAsync( new[] { new Plugin { Key = "K1" }, new Plugin { Key = "K2" }, new Plugin { Id = "3", Key = "K3" }, }); document.Received().AddManyAsync(Arg.Is <IReadOnlyList <Plugin> >(list => list.Count == 2)).Wait(); document.Received().UpdateManyAsync(Arg.Is <IReadOnlyList <Plugin> >(list => list.Count == 1)).Wait(); }