Ejemplo n.º 1
0
        public async Task GetListModelAsync_WhenRepositoryIsNull_ThrowsArgumentNullException <TKey>(TKey defaultKey)
        {
            // Arrange & Act & Assert
            var exception = await Assert.ThrowsAsync <ArgumentNullException>(
                () => RepositoryExtensions.GetListAsync <FakeModel, IEntity <TKey>, TKey>(null, x => x.Id.Equals(defaultKey))
                );

            Assert.Equal("repository", exception.ParamName);
        }