Skip to content

ToListAsync() returns empty list after package update to 6.0.0 #58

@VILLAN3LL3

Description

@VILLAN3LL3

After having updated the MockQueryable package to version 6.0.0 some of my unit tests fail because .ToListAsync() now returns an empty list.
Example code:

DbSet<Sections> mockSections = sections.AsQueryable().BuildMockDbSet();
_dbContext.Sections.Returns(mockSections); 
List<Section> sections = await _dbContext.Sections.ToListAsync(cancellationToken); 

The last line returns an empty list with the new package version. Why?

The failed tests and the full test code can be found here

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions