Skip to content

Commit

Permalink
EF Core 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
romantitov committed Sep 30, 2019
1 parent 38543fb commit 1a23b61
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static DbSet<TEntity> BuildMockDbSet<TEntity>(this IQueryable<TEntity> da
return mock;
}

[Obsolete]
[Obsolete("Use BuildMockDbSet<TEntity> instead")]
public static DbQuery<TEntity> BuildMockDbQuery<TEntity>(this IQueryable<TEntity> data) where TEntity : class
{
var mock = A.Fake<DbQuery<TEntity>>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/romantitov/MockQueryable</PackageProjectUrl>
<RepositoryUrl>https://github.com/romantitov/MockQueryable</RepositoryUrl>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>1.2.0-alpha</Version>
<AssemblyVersion>1.2.0.0</AssemblyVersion>
<FileVersion>1.2.0.0</FileVersion>
<Version>3.0.0</Version>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>3.0.0.0</FileVersion>
<Company></Company>
</PropertyGroup>

Expand Down
7 changes: 4 additions & 3 deletions src/MockQueryable/MockQueryable.Moq/MockQueryable.Moq.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
<TargetFramework>netstandard2.1</TargetFramework>
<Authors>Roman Titov</Authors>
<Company></Company>
<Version>1.2.0-alpha</Version>

<Description>Extension for mocking Entity Framework Core operations such ToListAsync, FirstOrDefaultAsync etc. by Moq
When writing tests for your application it is often desirable to avoid hitting the database. The extension allows you to achieve this by creating a context – with behavior defined by your tests – that makes use of in-memory data.</Description>
<PackageProjectUrl>https://github.com/romantitov/MockQueryable</PackageProjectUrl>
<RepositoryUrl>https://github.com/romantitov/MockQueryable</RepositoryUrl>
<PackageTags>Moq EntityFrameworkCore Queryable mock EF UnitTests</PackageTags>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>MockQueryable.Moq</PackageId>
<AssemblyVersion>1.2.0.0</AssemblyVersion>
<FileVersion>1.2.0.0</FileVersion>
<Version>3.0.0</Version>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>3.0.0.0</FileVersion>
<PackageReleaseNotes>AutoMapper support</PackageReleaseNotes>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/MockQueryable/MockQueryable.Moq/MoqExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static Mock<DbSet<TEntity>> BuildMockDbSet<TEntity>(this IQueryable<TEnti
return mock;
}

[Obsolete]
[Obsolete("Use BuildMockDbSet<TEntity> instead")]
public static Mock<DbQuery<TEntity>> BuildMockDbQuery<TEntity>(this IQueryable<TEntity> data)
where TEntity : class
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<TargetFramework>netstandard2.1</TargetFramework>
<Authors>Roman Titov</Authors>
<Company></Company>
<Version>1.2.0-alpha</Version>
<Description>Extension for mocking Entity Framework Core operations such ToListAsync, FirstOrDefaultAsync etc. by NSubstitute
When writing tests for your application it is often desirable to avoid hitting the database. The extension allows you to achieve this by creating a context – with behavior defined by your tests – that makes use of in-memory data.</Description>
<PackageProjectUrl>https://github.com/romantitov/MockQueryable</PackageProjectUrl>
<RepositoryUrl>https://github.com/romantitov/MockQueryable</RepositoryUrl>
<PackageTags>NSubstitute EntityFrameworkCore Queryable mock EF UnitTests</PackageTags>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AssemblyVersion>1.2.0.0</AssemblyVersion>
<FileVersion>1.2.0.0</FileVersion>
<Version>3.0.0</Version>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>3.0.0.0</FileVersion>
<PackageReleaseNotes>AutoMapper support</PackageReleaseNotes>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static DbSet<TEntity> BuildMockDbSet<TEntity>(this IQueryable<TEntity> da
return mock;
}

[Obsolete]
[Obsolete("Use BuildMockDbSet<TEntity> instead")]
public static DbQuery<TEntity> BuildMockDbQuery<TEntity>(this IQueryable<TEntity> data) where TEntity : class
{
var mock = Substitute.For<DbQuery<TEntity>, IQueryable<TEntity>, IAsyncEnumerable<TEntity>>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<ItemGroup>
<PackageReference Include="AutoMapper" Version="8.0.0" />
<PackageReference Include="FakeItEasy" Version="5.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.0.0-preview9.19423.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="Moq" Version="4.8.3" />
<PackageReference Include="NSubstitute" Version="3.1.0" />
<PackageReference Include="NUnit" Version="3.10.1" />
Expand Down
8 changes: 4 additions & 4 deletions src/MockQueryable/MockQueryable/MockQueryable.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/romantitov/MockQueryable</PackageProjectUrl>
<RepositoryUrl>https://github.com/romantitov/MockQueryable</RepositoryUrl>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>1.2.0-alpha</Version>
<AssemblyVersion>1.2.0.0</AssemblyVersion>
<FileVersion>1.2.0.0</FileVersion>
<Version>3.0.0</Version>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>3.0.0.0</FileVersion>
<Company></Company>
</PropertyGroup>

Expand All @@ -22,7 +22,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.0.0-preview9.19423.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.0.0" />
</ItemGroup>

</Project>

0 comments on commit 1a23b61

Please sign in to comment.