-
Notifications
You must be signed in to change notification settings - Fork 934
Fix configuration schema forbidding custom bytecode provider #1764
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
Fix configuration schema forbidding custom bytecode provider #1764
Conversation
@@ -35,6 +35,23 @@ public void FromAppConfigTest() | |||
Assert.IsTrue(hc.UseReflectionOptimizer); | |||
Assert.AreEqual("NHibernate.Test", hc.SessionFactory.Name); | |||
} | |||
|
|||
[Test] | |||
public void ByteCodeProvider() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test one above will fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first test of the fixture still succeeds because the configuration is invalid by lack of session-factory
node. That is not a schema validation error, but a hard-coded check in the parsing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understood that later, but did not report it here. Can you rename that test to something more meaningful than InvalidConfig
?
To be squashed.
@@ -13,7 +11,7 @@ namespace NHibernate.Test.CfgTest | |||
public class ConfigurationSchemaFixture | |||
{ | |||
[Test] | |||
public void InvalidConfig() | |||
public void ThrowIfSessionFactoryIsMissing() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strictly speaking <session-factory />
element is not required. It is required only when config is loaded not from app.config I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but the name is already long enough I find. ThrowIfSessionFactoryIsMissingWhenNotFromAppConfig
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, something like that. Or, better: SessionFactoryIsRequiredWhenConfigurationIsLoadedNotFromAppConfig
To be squashed.
No description provided.