public void CreateAsync_Multiple_InsertManyCalled() { // Arrange var models = new[] { new AnyModel { AnyString = "AnyString" } }; // Act _repository.CreateAsync(models); // Assert A.CallTo(() => _collection.InsertManyAsync(models, null, default)).MustHaveHappenedOnceExactly(); }
public Task CreateAsync(IEnumerable <TModel> data) => Collection.InsertManyAsync(data);