Skip to content

Fix test for SAP SQL Anywhere #2921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/NHibernate.Test/Async/Linq/LinqQuerySamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1416,9 +1416,12 @@ public void ReplaceFunctionWithNullArgumentAsync()
[Test(Description = "GH-2860")]
public async Task StringFormatWithTrimAsync()
{
if (TestDialect.HasBrokenTypeInferenceOnSelectedParameters)
Assert.Ignore("Current dialect does not support this test");

var q =
from e in db.Employees
select new {Name = $"{e.FirstName} {e.LastName}".Trim(), Phone = e.Address.PhoneNumber};
select new { Name = $"{e.FirstName} {e.LastName}".Trim(), Phone = e.Address.PhoneNumber };
var items = await (q.ToListAsync());
Assert.AreEqual(9, items.Count);
}
Expand Down
5 changes: 4 additions & 1 deletion src/NHibernate.Test/Linq/LinqQuerySamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2001,9 +2001,12 @@ public void ReplaceFunctionWithNullArgument()
[Test(Description = "GH-2860")]
public void StringFormatWithTrim()
{
if (TestDialect.HasBrokenTypeInferenceOnSelectedParameters)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is interesting how we fix it for Firebird by wrapping parameters into a cast expression, and don’t do same for other DBs.

Assert.Ignore("Current dialect does not support this test");

var q =
from e in db.Employees
select new {Name = $"{e.FirstName} {e.LastName}".Trim(), Phone = e.Address.PhoneNumber};
select new { Name = $"{e.FirstName} {e.LastName}".Trim(), Phone = e.Address.PhoneNumber };
var items = q.ToList();
Assert.AreEqual(9, items.Count);
}
Expand Down