File tree Expand file tree Collapse file tree 12 files changed +40
-45
lines changed
MockQueryable.EntityFrameworkCore
MockQueryable.NSubstitute Expand file tree Collapse file tree 12 files changed +40
-45
lines changed Original file line number Diff line number Diff line change 1414 <PackageTags >Mock EntityFrameworkCore Queryable mock EF UnitTests EntityFrameworkCore</PackageTags >
1515 <GeneratePackageOnBuild >true</GeneratePackageOnBuild >
1616 <PackageReleaseNotes >
17- #74 Fix ToListAsync() for mocked DbSet by using lazy-creation of AsyncEnumerator - Thanks @fischero19
18- #75 Added method for build DbSet from IEnumerable. - Thanks @sq735
17+ #77 BuildMock moved to MockQueryable.EntityFrameworkCore - Thanks @skarllot
1918 </PackageReleaseNotes >
20- <Version >7.0.1 </Version >
21- <AssemblyVersion >7.0.0.1 </AssemblyVersion >
22- <FileVersion >7.0.0.1 </FileVersion >
19+ <Version >7.0.2 </Version >
20+ <AssemblyVersion >7.0.0.2 </AssemblyVersion >
21+ <FileVersion >7.0.0.2 </FileVersion >
2322 <Company ></Company >
2423 <PackageLicenseFile >LICENSE</PackageLicenseFile >
2524 <PackageReadmeFile >README.md</PackageReadmeFile >
Original file line number Diff line number Diff line change 1515 <PackageTags >Mock EntityFrameworkCore Queryable mock EF UnitTests EntityFrameworkCore</PackageTags >
1616 <GeneratePackageOnBuild >true</GeneratePackageOnBuild >
1717 <PackageReleaseNotes >
18- #74 Fix ToListAsync() for mocked DbSet by using lazy-creation of AsyncEnumerator - Thanks @fischero19
19- #75 Added method for build DbSet from IEnumerable. - Thanks @sq735
18+ #77 BuildMock moved to MockQueryable.EntityFrameworkCore - Thanks @skarllot
2019 </PackageReleaseNotes >
21- <Version >7.0.1 </Version >
22- <AssemblyVersion >7.0.0.1 </AssemblyVersion >
23- <FileVersion >7.0.0.1 </FileVersion >
20+ <Version >7.0.2 </Version >
21+ <AssemblyVersion >7.0.0.2 </AssemblyVersion >
22+ <FileVersion >7.0.0.2 </FileVersion >
2423 <Company ></Company >
2524 <PackageLicenseFile >LICENSE</PackageLicenseFile >
2625 <PackageReadmeFile >README.md</PackageReadmeFile >
Original file line number Diff line number Diff line change 1+ using System . Collections . Generic ;
2+ using System . Linq ;
3+
4+
5+ namespace MockQueryable . EntityFrameworkCore
6+ {
7+ public static class MockQueryableExtensions
8+ {
9+ public static IQueryable < TEntity > BuildMock < TEntity > ( this IEnumerable < TEntity > data ) where TEntity : class
10+ {
11+ return new TestAsyncEnumerableEfCore < TEntity > ( data ) ;
12+ }
13+ }
14+ }
Original file line number Diff line number Diff line change @@ -10,11 +10,6 @@ namespace MockQueryable.FakeItEasy
1010{
1111 public static class FakeItEasyExtensions
1212 {
13- public static IQueryable < TEntity > BuildMock < TEntity > ( this IEnumerable < TEntity > data ) where TEntity : class
14- {
15- return new TestAsyncEnumerableEfCore < TEntity > ( data ) ;
16- }
17-
1813 public static DbSet < TEntity > BuildMockDbSet < TEntity > ( this IEnumerable < TEntity > data ) where TEntity : class => data . BuildMock ( ) . BuildMockDbSet ( ) ;
1914
2015 public static DbSet < TEntity > BuildMockDbSet < TEntity > ( this IQueryable < TEntity > data ) where TEntity : class
Original file line number Diff line number Diff line change 1414 <PackageTags >Mock EntityFrameworkCore Queryable mock EF EFCore UnitTests FakeItEasy</PackageTags >
1515 <GeneratePackageOnBuild >true</GeneratePackageOnBuild >
1616 <PackageReleaseNotes >
17- #74 Fix ToListAsync() for mocked DbSet by using lazy-creation of AsyncEnumerator - Thanks @fischero19
18- #75 Added method for build DbSet from IEnumerable. - Thanks @sq735
17+ #77 BuildMock moved to MockQueryable.EntityFrameworkCore - Thanks @skarllot
1918 </PackageReleaseNotes >
20- <Version >7.0.1 </Version >
21- <AssemblyVersion >7.0.0.1 </AssemblyVersion >
22- <FileVersion >7.0.0.1 </FileVersion >
19+ <Version >7.0.2 </Version >
20+ <AssemblyVersion >7.0.0.2 </AssemblyVersion >
21+ <FileVersion >7.0.0.2 </FileVersion >
2322 <Company ></Company >
2423 <PackageLicenseFile >LICENSE</PackageLicenseFile >
2524 <PackageReadmeFile >README.md</PackageReadmeFile >
Original file line number Diff line number Diff line change 1414 <PackageTags >Mock EntityFrameworkCore Queryable mock EF EFCore UnitTests EntityFrameworkCore Moq</PackageTags >
1515 <GeneratePackageOnBuild >true</GeneratePackageOnBuild >
1616 <PackageReleaseNotes >
17- #74 Fix ToListAsync() for mocked DbSet by using lazy-creation of AsyncEnumerator - Thanks @fischero19
18- #75 Added method for build DbSet from IEnumerable. - Thanks @sq735
17+ #77 BuildMock moved to MockQueryable.EntityFrameworkCore - Thanks @skarllot
1918 </PackageReleaseNotes >
20- <Version >7.0.1 </Version >
21- <AssemblyVersion >7.0.0.1 </AssemblyVersion >
22- <FileVersion >7.0.0.1 </FileVersion >
19+ <Version >7.0.2 </Version >
20+ <AssemblyVersion >7.0.0.2 </AssemblyVersion >
21+ <FileVersion >7.0.0.2 </FileVersion >
2322 <Company ></Company >
2423 <PackageLicenseFile >LICENSE</PackageLicenseFile >
2524 <PackageReadmeFile >README.md</PackageReadmeFile >
Original file line number Diff line number Diff line change @@ -10,11 +10,7 @@ namespace MockQueryable.Moq
1010{
1111 public static class MoqExtensions
1212 {
13- public static IQueryable < TEntity > BuildMock < TEntity > ( this IEnumerable < TEntity > data ) where TEntity : class
14- {
15- return new TestAsyncEnumerableEfCore < TEntity > ( data ) ;
16- }
17-
13+
1814 public static Mock < DbSet < TEntity > > BuildMockDbSet < TEntity > ( this IEnumerable < TEntity > data ) where TEntity : class => data . BuildMock ( ) . BuildMockDbSet ( ) ;
1915
2016 public static Mock < DbSet < TEntity > > BuildMockDbSet < TEntity > ( this IQueryable < TEntity > data ) where TEntity : class
Original file line number Diff line number Diff line change 1414 <PackageTags >Mock EntityFrameworkCore Queryable mock EF EFCore UnitTests EntityFrameworkCore NSubstitute</PackageTags >
1515 <GeneratePackageOnBuild >true</GeneratePackageOnBuild >
1616 <PackageReleaseNotes >
17- #74 Fix ToListAsync() for mocked DbSet by using lazy-creation of AsyncEnumerator - Thanks @fischero19
18- #75 Added method for build DbSet from IEnumerable. - Thanks @sq735
17+ #77 BuildMock moved to MockQueryable.EntityFrameworkCore - Thanks @skarllot
1918 </PackageReleaseNotes >
20- <Version >7.0.1 </Version >
21- <AssemblyVersion >7.0.0.1 </AssemblyVersion >
22- <FileVersion >7.0.0.1 </FileVersion >
19+ <Version >7.0.2 </Version >
20+ <AssemblyVersion >7.0.0.2 </AssemblyVersion >
21+ <FileVersion >7.0.0.2 </FileVersion >
2322 <Company ></Company >
2423 <PackageLicenseFile >LICENSE</PackageLicenseFile >
2524 <PackageReadmeFile >README.md</PackageReadmeFile >
Original file line number Diff line number Diff line change @@ -10,11 +10,6 @@ namespace MockQueryable.NSubstitute
1010{
1111 public static class NSubstituteExtensions
1212 {
13- public static IQueryable < TEntity > BuildMock < TEntity > ( this IEnumerable < TEntity > data ) where TEntity : class
14- {
15- return new TestAsyncEnumerableEfCore < TEntity > ( data ) ;
16- }
17-
1813 public static DbSet < TEntity > BuildMockDbSet < TEntity > ( this IEnumerable < TEntity > data ) where TEntity : class => data . BuildMock ( ) . BuildMockDbSet ( ) ;
1914
2015 public static DbSet < TEntity > BuildMockDbSet < TEntity > ( this IQueryable < TEntity > data ) where TEntity : class
Original file line number Diff line number Diff line change 66using System . Threading . Tasks ;
77using FakeItEasy ;
88using Microsoft . EntityFrameworkCore ;
9+ using MockQueryable . EntityFrameworkCore ;
910using MockQueryable . FakeItEasy ;
1011using NUnit . Framework ;
1112
You can’t perform that action at this time.
0 commit comments