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