Skip to content

WIP - Replace IObjectsFactory with IServiceProvider interface #1793

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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
22 changes: 22 additions & 0 deletions src/NHibernate.Test/Async/CfgTest/SettingsFactoryFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,28 @@ namespace NHibernate.Test.CfgTest
public class SettingsFactoryFixtureAsync
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This class should not be generated as there is nothing async, it is a bug related to async generator that I need to fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I released a new version of the async generator (0.8.2.10) that fixes the issue of generating non async methods.

{

[Test]
public void DefaultServices()
{
var properties = new Dictionary<string, string>
{
{Environment.Dialect, typeof(Dialect.PostgreSQL83Dialect).FullName},
{Environment.UseQueryCache, "true"}
};
var settings = new SettingsFactory().BuildSettings(properties);
Assert.That(settings.BatcherFactory, Is.TypeOf<NonBatchingBatcherFactory>());
Assert.That(settings.CacheProvider, Is.TypeOf<NoCacheProvider>());
Assert.That(settings.ConnectionProvider, Is.TypeOf<UserSuppliedConnectionProvider>());
Assert.That(settings.Dialect, Is.TypeOf<Dialect.PostgreSQL83Dialect>());
Assert.That(settings.LinqToHqlGeneratorsRegistry, Is.TypeOf<DefaultLinqToHqlGeneratorsRegistry>());
Assert.That(settings.QueryCacheFactory, Is.TypeOf<StandardQueryCacheFactory>());
Assert.That(settings.QueryModelRewriterFactory, Is.Null);
Assert.That(settings.QueryTranslatorFactory, Is.TypeOf<ASTQueryTranslatorFactory>());
Assert.That(settings.QueryCacheFactory, Is.TypeOf<StandardQueryCacheFactory>());
Assert.That(settings.SqlExceptionConverter, Is.TypeOf<SQLStateConverter>());
Assert.That(settings.TransactionFactory, Is.TypeOf<AdoNetWithSystemTransactionFactory>());
}

[Test]
public async Task InvalidRegisteredServicesAsync()
{
Expand Down