Skip to content

Commit

Permalink
EntityFramework.DynamicLinq.Tests for 461
Browse files Browse the repository at this point in the history
  • Loading branch information
StefH committed Feb 17, 2017
1 parent ce20c30 commit 32b88fc
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 42 deletions.
2 changes: 2 additions & 0 deletions test/System.Linq.Dynamic.Core.Tests/EntitiesTests.AnyAsync.cs
@@ -1,6 +1,8 @@
#if EFCORE
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.DynamicLinq;
#else
using System.Data.Entity;
using EntityFramework.DynamicLinq;
#endif
using System.Threading.Tasks;
Expand Down
6 changes: 3 additions & 3 deletions test/System.Linq.Dynamic.Core.Tests/InternalTests.cs
@@ -1,12 +1,12 @@
#if !(NET35 || NETSTANDARD)
//#if !(NET35 || NETSTANDARD)
using System.Threading.Tasks;
#endif
//#endif

namespace System.Linq.Dynamic.Core.Tests
{
public class InternalTests
{
#if !(NETSTANDARD)
#if ABC
[Fact]
public void ClassFactory_LoadTest()
{
Expand Down
4 changes: 3 additions & 1 deletion test/System.Linq.Dynamic.Core.Tests/Logging/DbLogger.cs
@@ -1,3 +1,4 @@
#if EFCORE
using Microsoft.Extensions.Logging;

namespace System.Linq.Dynamic.Core.Tests.Logging
Expand All @@ -22,4 +23,5 @@ public IDisposable BeginScope<TState>(TState state)
return null;
}
}
}
}
#endif
@@ -1,4 +1,5 @@
using Microsoft.EntityFrameworkCore.Storage.Internal;
#if EFCORE
using Microsoft.EntityFrameworkCore.Storage.Internal;
using Microsoft.Extensions.Logging;

namespace System.Linq.Dynamic.Core.Tests.Logging
Expand All @@ -25,4 +26,5 @@ public void Dispose()
{
}
}
}
}
#endif
6 changes: 4 additions & 2 deletions test/System.Linq.Dynamic.Core.Tests/Logging/NullLogger.cs
@@ -1,4 +1,5 @@
using Microsoft.Extensions.Logging;
#if EFCORE
using Microsoft.Extensions.Logging;

namespace System.Linq.Dynamic.Core.Tests.Logging
{
Expand All @@ -18,4 +19,5 @@ public IDisposable BeginScope<TState>(TState state)
return null;
}
}
}
}
#endif
Expand Up @@ -9,7 +9,11 @@ class NetStandardCustomTypeProvider : AbstractDynamicLinqCustomTypeProvider, IDy
public HashSet<Type> GetCustomTypes()
{
var thisType = typeof (Program);
#if NETSTANDARD
var assemblies = AppDomain.NetCoreApp.AppDomain.CurrentDomain.GetAssemblies(thisType).Where(x => !x.IsDynamic).ToArray();
#else
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
#endif

return new HashSet<Type>(FindTypesMarkedWithDynamicLinqTypeAttribute(assemblies));
}
Expand Down
76 changes: 42 additions & 34 deletions test/System.Linq.Dynamic.Core.Tests/project.json
@@ -1,39 +1,47 @@
{
"version": "1.0.0-*",
"authors": [ "Stef Heyenrath" ],
"dependencies": {
"Newtonsoft.Json": "9.0.1",
"Linq.PropertyTranslator.Core": "1.0.3",
"QueryInterceptor.Core": "1.0.5",
"System.AppDomain.NetCoreApp": "1.0.1",
"System.Linq.Dynamic.Core": { "target": "project" },
"Microsoft.EntityFrameworkCore.DynamicLinq": { "target": "project" },
"dotnet-test-xunit": "2.2.0-preview2-build1029",
"xunit": "2.2.0-beta2-build3300"
},
"version": "1.0.0-*",
"authors": [ "Stef Heyenrath" ],
"dependencies": {
"dotnet-test-xunit": "2.2.0-preview2-build1029",
"Linq.PropertyTranslator.Core": "1.0.3",
"Newtonsoft.Json": "9.0.1",
"QueryInterceptor.Core": "1.0.5",
"System.Linq.Dynamic.Core": { "target": "project" },
"xunit": "2.2.0-beta2-build3300"
},

"frameworks": {
"netcoreapp1.0": {
"buildOptions": { "define": [ "NETSTANDARD", "EFCORE" ] },
"imports": [
"dnxcore50",
"dotnet5.4",
"portable-net451+win8"
],
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
"frameworks": {
"net461": {
"buildOptions": { "define": [ "EF" ] },
"dependencies": {
"EntityFramework": "6.1.3",
"EntityFramework.DynamicLinq": { "target": "project" },
"Microsoft.AspNet.Identity.EntityFramework": "2.2.1"
}
},
"Microsoft.EntityFrameworkCore": "1.1.0",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.0",
"Microsoft.EntityFrameworkCore.Sqlite": "1.1.0",
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
"System.Linq.Parallel": "4.3.0",
"System.Threading.Tasks": "4.3.0"
}
}
},
"netcoreapp1.0": {
"buildOptions": { "define": [ "NETSTANDARD", "EFCORE" ] },
"imports": [
"dnxcore50",
"dotnet5.4",
"portable-net451+win8"
],
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
},
"Microsoft.EntityFrameworkCore.DynamicLinq": { "target": "project" },
"System.AppDomain.NetCoreApp": "1.0.1",
"Microsoft.EntityFrameworkCore": "1.1.0",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.0",
"Microsoft.EntityFrameworkCore.Sqlite": "1.1.0",
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
"System.Linq.Parallel": "4.3.0",
"System.Threading.Tasks": "4.3.0"
}
}
},

"testRunner": "xunit"
"testRunner": "xunit"
}

0 comments on commit 32b88fc

Please sign in to comment.