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 14
14
<PackageTags >Mock EntityFrameworkCore Queryable mock EF UnitTests EntityFrameworkCore</PackageTags >
15
15
<GeneratePackageOnBuild >true</GeneratePackageOnBuild >
16
16
<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
19
18
</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 >
23
22
<Company ></Company >
24
23
<PackageLicenseFile >LICENSE</PackageLicenseFile >
25
24
<PackageReadmeFile >README.md</PackageReadmeFile >
Original file line number Diff line number Diff line change 15
15
<PackageTags >Mock EntityFrameworkCore Queryable mock EF UnitTests EntityFrameworkCore</PackageTags >
16
16
<GeneratePackageOnBuild >true</GeneratePackageOnBuild >
17
17
<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
20
19
</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 >
24
23
<Company ></Company >
25
24
<PackageLicenseFile >LICENSE</PackageLicenseFile >
26
25
<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
10
10
{
11
11
public static class FakeItEasyExtensions
12
12
{
13
- public static IQueryable < TEntity > BuildMock < TEntity > ( this IEnumerable < TEntity > data ) where TEntity : class
14
- {
15
- return new TestAsyncEnumerableEfCore < TEntity > ( data ) ;
16
- }
17
-
18
13
public static DbSet < TEntity > BuildMockDbSet < TEntity > ( this IEnumerable < TEntity > data ) where TEntity : class => data . BuildMock ( ) . BuildMockDbSet ( ) ;
19
14
20
15
public static DbSet < TEntity > BuildMockDbSet < TEntity > ( this IQueryable < TEntity > data ) where TEntity : class
Original file line number Diff line number Diff line change 14
14
<PackageTags >Mock EntityFrameworkCore Queryable mock EF EFCore UnitTests FakeItEasy</PackageTags >
15
15
<GeneratePackageOnBuild >true</GeneratePackageOnBuild >
16
16
<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
19
18
</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 >
23
22
<Company ></Company >
24
23
<PackageLicenseFile >LICENSE</PackageLicenseFile >
25
24
<PackageReadmeFile >README.md</PackageReadmeFile >
Original file line number Diff line number Diff line change 14
14
<PackageTags >Mock EntityFrameworkCore Queryable mock EF EFCore UnitTests EntityFrameworkCore Moq</PackageTags >
15
15
<GeneratePackageOnBuild >true</GeneratePackageOnBuild >
16
16
<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
19
18
</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 >
23
22
<Company ></Company >
24
23
<PackageLicenseFile >LICENSE</PackageLicenseFile >
25
24
<PackageReadmeFile >README.md</PackageReadmeFile >
Original file line number Diff line number Diff line change @@ -10,11 +10,7 @@ namespace MockQueryable.Moq
10
10
{
11
11
public static class MoqExtensions
12
12
{
13
- public static IQueryable < TEntity > BuildMock < TEntity > ( this IEnumerable < TEntity > data ) where TEntity : class
14
- {
15
- return new TestAsyncEnumerableEfCore < TEntity > ( data ) ;
16
- }
17
-
13
+
18
14
public static Mock < DbSet < TEntity > > BuildMockDbSet < TEntity > ( this IEnumerable < TEntity > data ) where TEntity : class => data . BuildMock ( ) . BuildMockDbSet ( ) ;
19
15
20
16
public static Mock < DbSet < TEntity > > BuildMockDbSet < TEntity > ( this IQueryable < TEntity > data ) where TEntity : class
Original file line number Diff line number Diff line change 14
14
<PackageTags >Mock EntityFrameworkCore Queryable mock EF EFCore UnitTests EntityFrameworkCore NSubstitute</PackageTags >
15
15
<GeneratePackageOnBuild >true</GeneratePackageOnBuild >
16
16
<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
19
18
</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 >
23
22
<Company ></Company >
24
23
<PackageLicenseFile >LICENSE</PackageLicenseFile >
25
24
<PackageReadmeFile >README.md</PackageReadmeFile >
Original file line number Diff line number Diff line change @@ -10,11 +10,6 @@ namespace MockQueryable.NSubstitute
10
10
{
11
11
public static class NSubstituteExtensions
12
12
{
13
- public static IQueryable < TEntity > BuildMock < TEntity > ( this IEnumerable < TEntity > data ) where TEntity : class
14
- {
15
- return new TestAsyncEnumerableEfCore < TEntity > ( data ) ;
16
- }
17
-
18
13
public static DbSet < TEntity > BuildMockDbSet < TEntity > ( this IEnumerable < TEntity > data ) where TEntity : class => data . BuildMock ( ) . BuildMockDbSet ( ) ;
19
14
20
15
public static DbSet < TEntity > BuildMockDbSet < TEntity > ( this IQueryable < TEntity > data ) where TEntity : class
Original file line number Diff line number Diff line change 6
6
using System . Threading . Tasks ;
7
7
using FakeItEasy ;
8
8
using Microsoft . EntityFrameworkCore ;
9
+ using MockQueryable . EntityFrameworkCore ;
9
10
using MockQueryable . FakeItEasy ;
10
11
using NUnit . Framework ;
11
12
You can’t perform that action at this time.
0 commit comments