예제 #1
0
        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();
        }
예제 #2
0
 public Task CreateAsync(IEnumerable <TModel> data) => Collection.InsertManyAsync(data);