forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
86 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="NUnit.Console" version="3.7.0" targetFramework="net461" /> | ||
<package id="NUnit.ConsoleRunner" version="3.7.0" targetFramework="net461" /> | ||
<package id="NUnit.Console" version="3.10.0" targetFramework="net461" /> | ||
<package id="NUnit.ConsoleRunner" version="3.10.0" targetFramework="net461" /> | ||
<package id="NUnit.Extension.NUnitProjectLoader" version="3.6.0" targetFramework="net461" /> | ||
<package id="NUnit.Extension.NUnitV2Driver" version="3.7.0" targetFramework="net461" /> | ||
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net461" /> | ||
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.2" targetFramework="net461" /> | ||
<package id="NUnit.Extension.VSProjectLoader" version="3.6.0" targetFramework="net461" /> | ||
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.6" targetFramework="net461" /> | ||
<package id="NUnit.Extension.VSProjectLoader" version="3.8.0" targetFramework="net461" /> | ||
<package id="CSharpAsyncGenerator.CommandLine" version="0.14.0" targetFramework="net461" /> | ||
<package id="vswhere" version="2.1.4" targetFramework="net461" /> | ||
<package id="gitreleasemanager" version="0.7.0" targetFramework="net461" /> | ||
<package id="GitReleaseManager" version="0.7.0" targetFramework="net461" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
src/NHibernate.Test/Async/NHSpecificTest/GH1963/Fixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by AsyncGenerator. | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
|
||
using System; | ||
using System.Linq; | ||
using NHibernate.UserTypes; | ||
using NUnit.Framework; | ||
using NHibernate.Linq; | ||
|
||
namespace NHibernate.Test.NHSpecificTest.GH1963 | ||
{ | ||
using System.Threading.Tasks; | ||
[TestFixture] | ||
public class FixtureAsync : BugTestCase | ||
{ | ||
protected override void OnSetUp() | ||
{ | ||
using (var session = OpenSession()) | ||
using (var transaction = session.BeginTransaction()) | ||
{ | ||
var e1 = new Entity {Name = "Bob", Flag = true}; | ||
session.Save(e1); | ||
|
||
var e2 = new Entity {Name = "Sally"}; | ||
session.Save(e2); | ||
|
||
transaction.Commit(); | ||
} | ||
} | ||
|
||
protected override void OnTearDown() | ||
{ | ||
using (var session = OpenSession()) | ||
using (var transaction = session.BeginTransaction()) | ||
{ | ||
session.CreateQuery("delete from System.Object").ExecuteUpdate(); | ||
|
||
transaction.Commit(); | ||
} | ||
} | ||
|
||
[Test] | ||
public void LinqFilterOnNonLiteralCustomTypeAsync() | ||
{ | ||
using (var session = OpenSession()) | ||
using (session.BeginTransaction()) | ||
{ | ||
var result = from e in session.Query<Entity>() | ||
where e.Flag | ||
select e; | ||
|
||
Assert.That( | ||
() => result.ToListAsync(), | ||
Throws | ||
.InnerException.TypeOf<InvalidOperationException>() | ||
.And.InnerException.Message.Contains(nameof(IEnhancedUserType))); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters