diff --git a/lib/net/SharpTestsEx.NUnit.dll b/lib/net/SharpTestsEx.NUnit.dll
deleted file mode 100644
index 45fb62b3a7e..00000000000
Binary files a/lib/net/SharpTestsEx.NUnit.dll and /dev/null differ
diff --git a/lib/net/SharpTestsEx.NUnit.xml b/lib/net/SharpTestsEx.NUnit.xml
deleted file mode 100644
index 919b71ab287..00000000000
--- a/lib/net/SharpTestsEx.NUnit.xml
+++ /dev/null
@@ -1,772 +0,0 @@
-
-
-
- SharpTestsEx.NUnit
-
-
-
-
- Assertion for .
-
-
-
-
- Verifies that the given throws a specific .
-
- The specific expected .
- The given to execute.
- The .
- The does not throws the expected .
-
-
-
- Verifies that the given throws a specific .
-
- The specific expected .
- The given to execute.
- A message to display if the assertion fails. This message can be seen in the unit test results.
- The .
- The does not throws the expected .
-
-
-
- Verifies that the given throws an .
-
- The given to execute.
- The .
- The does not throws an .
-
-
-
- Verifies that the given throws an .
-
- The given to execute.
- A message to display if the assertion fails. This message can be seen in the unit test results.
- The .
- The does not throws the expected .
-
-
-
- Verifies that the given does not throw any .
-
- The given to execute.
-
-
-
- Verifies that the given does not throw any .
-
- The given to execute.
- A message to display if the assertion fails. This message can be seen in the unit test results.
-
-
-
- The intention of is to create a more readable
- string representation for the failure message.
-
-
-
-
- Verifies that the specified object is null. The assertion fails if it is not null.
-
- Type of the actual value subject of the assertion.
-
-
-
- Represent a Assertion template where the real logic is delegated.
-
- Type of the actual value.
- Type of the expected value.
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Verifies that two specified generic type data are equal. The assertion fails if they are not equal.
-
- Type of the actual value.
- Type of the expected value.
-
- The comparison is done ny the base .
-
-
-
-
- Initializes a new instance of the class.
-
- The value to compare.
-
-
-
- Verifies that two specified instances are the same object instance..
-
- Type of the actual value.
- Type of the expected value.
-
-
-
- Initializes a new instance of the class.
-
- The value to compare.
-
-
-
- Extensions for constraint over object instances.
-
-
-
-
- Verifies that actual is the same instance than .
-
- The extented.
- The expected object instance.
- Chainable And constraint
-
-
-
- Verifies that actual is an instance of .
-
- The expected.
- The extented.
- Chainable And constraint
-
-
-
- Verifies that actual instance is assignable from .
-
- The expected.
- The extented.
- Chainable And constraint
-
-
-
- Verifies that actual instance is assignable to .
-
- The expected.
- The extented.
- Chainable And constraint
-
-
-
- Verifies that actual instance is serializable using .
-
- The extented.
- Chainable And constraint
-
-
-
- Verifies that actual instance is serializable using .
-
- The extented.
- Chainable And constraint
-
-
-
- Useful class to avoid the creation of new Action.
-
-
- This class can be used when the instance of the class under test is no available;
- typically to test a constructor.
- When you have an instance of the class under test the most appropite way to test an action
- is the extension .
-
-
-
- Executing.This(() => new AClass(null)).Should().Throw();
-
-
- Executing.This(() => new AClass(null)).Should().Throw{ArgumentNullException}()
- .And.ValueOf
- .ParamName.Should().Be("obj");
-
-
-
-
-
- Basic contract for a generic constraint.
-
- The type of the 'actual' value subject of the test.
-
-
-
- Verifies that the throws a specific .
-
- The specific subclass expected.
- Chainable And constraint
-
-
-
- Verifies that the throws an .
-
- Chainable And constraint
-
-
-
- Verifies that the does not throw any .
-
-
-
-
- etensions methods.
-
-
-
-
- Find the first position where two sequence differ
-
- The type of the elements of the input sequences.
- An to compare to second
- An to compare to the first sequence.
- The position of the first difference; otherwise -1 where the two sequences has the same sequence.
-
-
-
- Useful extensions to test s.
-
-
-
-
- Returns a sequence of all Inner Exceptions.
-
- The root
- A of all Inner Exceptions
-
-
-
- Returns a sequence of including the root and all Inner Exceptions.
-
- The root
- A of including the root and all Inner Exceptions.
-
-
-
- Constraints for .
-
-
-
-
- Verifies that the throws a specific .
-
- The specific subclass expected.
- Chainable And constraint
-
-
-
- Verifies that the throws an.
-
- Chainable And constraint
-
-
-
- Verifies that the does not throw any .
-
-
-
-
- The instance thrown.
-
-
-
-
- var ex = (new Action(() => new AClass(null))).Should().Throw().Exception;
-
-
-
-
-
-
- Chainable constraint for
-
- The specific subclass expected.
-
-
-
- The thrown.
-
-
- Allow an readable chained way to begin a new assertion based on one of the properties
- of the expected
-
-
- (new Action(() => new AClass(null)))
- .Should().Throw{ArgumentNullException}()
- .And.ValueOf.ParamName
- .Should().Be.EqualTo("obj");
-
-
-
-
-
-
- The instance thrown.
-
-
- Allow an readable chained way to begin a new assertion based on the itself.
-
-
- (new Action(() => new AClass(null)))
- .Should().Throw()
- .And.Exception.Should().Be.InstanceOf{ArgumentException}();
-
-
-
-
-
-
- Assertion information.
-
- The type of the value subject of the assertion.
-
-
-
- Subject of the assertion.
-
-
-
-
- The assertion is negated ?
-
-
-
-
- The title of the assertion ("message" in MsTests terminology)
-
-
-
-
- Constraint over boolean values.
-
-
-
-
- Constraints for boolean "Should Be"
-
-
-
-
- Verifies that actual is true.
-
-
-
-
- Verifies that actual is false.
-
-
-
-
- Negate next constraint.
-
-
-
-
- Constraint over object instances.
-
-
-
-
- Constraints for object instance of a specific gine .
-
- The of the instance.
-
-
-
- The actual value
-
-
-
-
- The actual value
-
-
-
-
- Constraints for object instance "Should Be"
-
-
-
-
- Verifies that actual is equal to .
-
- The expected instance
- Chainable And constraint
-
-
-
- Verifies that the is null.
-
- Chainable And constraint
-
-
-
- Verifies that the actual is an instance of a specific type.
-
- The expected .
-
- A for the instance converted to
- the specified type to start a chained assertion.
-
-
-
-
- Constraint over instances.
-
- The concrete type of actual value.
-
-
-
- Constraints for instance ("Should Be")
-
-
-
-
-
- Verifies that actual is equal to .
-
- The expected instance
- Chainable And constraint
-
-
-
- Verifies that actual is greater than .
-
- The expected instance
- Chainable And constraint
-
-
-
- Verifies that actual is less than .
-
- The expected instance
- Chainable And constraint
-
-
-
- Verifies that actual is greater than or equal to .
-
- The expected instance
- Chainable And constraint
-
-
-
- Verifies that actual is less than or equal to .
-
- The expected instance
- Chainable And constraint
-
-
-
- Verifies that actual is included in the range -.
-
- The less aceptable value.
- The higher aceptable value.
- Chainable And constraint
-
-
-
- Verifies that the instance is null.
-
- Chainable And constraint
-
-
-
- Verifies that the is empty.
-
- Chainable And constraint
-
-
-
- Verifies that the is null.
-
- Chainable And constraint
-
-
-
- Verifies that the is empty.
-
- Chainable And constraint
-
-
-
- Verifies that the instance is null.
-
- Chainable And constraint
-
-
-
- Collection information to build the failure message
-
- Type of the actual value.
- Type of the expected value.
-
-
-
- The actual value under test.
-
-
-
-
- The expected value of the test.
-
-
-
-
- The name of the assertion
-
-
- "be EqualTo"
-
-
-
-
- The user custom message.
-
-
-
-
- Extensions for any System.Object.
-
-
-
-
- Allow access to a private field of a class instance.
-
- The of the field.
- The class instance.
- The field name.
- The value of the field.
-
-
-
- A strongly-typed resource class, for looking up localized strings, etc.
-
-
-
-
- Returns the cached ResourceManager instance used by this class.
-
-
-
-
- Overrides the current thread's CurrentUICulture property for all
- resource lookups using this strongly typed resource class.
-
-
-
-
- Looks up a localized string similar to Should.
-
-
-
-
- Looks up a localized string similar to Be.
-
-
-
-
- Looks up a localized string similar to <Empty>.
-
-
-
-
- Looks up a localized string similar to Can't access to a field of a null value..
-
-
-
-
- Looks up a localized string similar to The class {0} does not contain a field named {1}..
-
-
-
-
- Looks up a localized string similar to The class {0} does contain a field named {1} but its type is {2} and not {3}..
-
-
-
-
- Looks up a localized string similar to Can't check serialization for (null) value..
-
-
-
-
- Looks up a localized string similar to Expected: {0}.
-
-
-
-
- Looks up a localized string similar to Differences :.
-
-
-
-
- Looks up a localized string similar to Values differ at position {0}..
-
-
-
-
- Looks up a localized string similar to Not expected exception message:.
-
-
-
-
- Looks up a localized string similar to Strings differ at position {0}..
-
-
-
-
- Looks up a localized string similar to Found : {0}.
-
-
-
-
- Looks up a localized string similar to Not.
-
-
-
-
- Looks up a localized string similar to (null).
-
-
-
-
- Looks up a localized string similar to Be Assignable From.
-
-
-
-
- Looks up a localized string similar to Be Assignable To.
-
-
-
-
- Looks up a localized string similar to Be Binary Serializable.
-
-
-
-
- Looks up a localized string similar to Be Empty.
-
-
-
-
- Looks up a localized string similar to Be Equal To.
-
-
-
-
- Looks up a localized string similar to Be Greater Than.
-
-
-
-
- Looks up a localized string similar to Be Greater than Or Equal to.
-
-
-
-
- Looks up a localized string similar to Be in Range.
-
-
-
-
- Looks up a localized string similar to Be Instance Of.
-
-
-
-
- Looks up a localized string similar to Be Less Than.
-
-
-
-
- Looks up a localized string similar to Be Less than Or Equal to.
-
-
-
-
- Looks up a localized string similar to Be Null.
-
-
-
-
- Looks up a localized string similar to Be Ordered.
-
-
-
-
- Looks up a localized string similar to Be Ordered ascending.
-
-
-
-
- Looks up a localized string similar to Be Ordered By ({0}).
-
-
-
-
- Looks up a localized string similar to Be Same instance As.
-
-
-
-
- Looks up a localized string similar to Be SubClass Of.
-
-
-
-
- Looks up a localized string similar to Be Subset Of.
-
-
-
-
- Looks up a localized string similar to Be Xml Serializable.
-
-
-
-
- Looks up a localized string similar to Contain.
-
-
-
-
- Looks up a localized string similar to Not throw.
-
-
-
-
- Looks up a localized string similar to Have Attribute.
-
-
-
-
- Looks up a localized string similar to Have Same Sequence As.
-
-
-
-
- Looks up a localized string similar to Have Same Values As.
-
-
-
-
- Looks up a localized string similar to Have Unique Values.
-
-
-
-
- Looks up a localized string similar to Have Value.
-
-
-
-
- Looks up a localized string similar to Throw.
-
-
-
-
- Looks up a localized string similar to Throws an exception.
-
-
-
-
diff --git a/lib/net/SharpTestsEx_License.txt b/lib/net/SharpTestsEx_License.txt
deleted file mode 100644
index da3dc935e5c..00000000000
--- a/lib/net/SharpTestsEx_License.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Microsoft Public License (Ms-PL)
-
-This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
-
-1. Definitions
-
-The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
-
-A "contribution" is the original software, or any additions or changes to the software.
-
-A "contributor" is any person that distributes its contribution under this license.
-
-"Licensed patents" are a contributor's patent claims that read directly on its contribution.
-
-2. Grant of Rights
-
-(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
-
-(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
-
-3. Conditions and Limitations
-
-(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
-
-(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
-
-(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
-
-(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
-
-(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
\ No newline at end of file
diff --git a/src/NHibernate.Test.VisualBasic/NHibernate.Test.VisualBasic.build b/src/NHibernate.Test.VisualBasic/NHibernate.Test.VisualBasic.build
index 78668b557c5..393e45848cb 100644
--- a/src/NHibernate.Test.VisualBasic/NHibernate.Test.VisualBasic.build
+++ b/src/NHibernate.Test.VisualBasic/NHibernate.Test.VisualBasic.build
@@ -25,7 +25,6 @@
-
diff --git a/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs b/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs
index 4d35bbbdb56..35d7295c299 100644
--- a/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs
+++ b/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs
@@ -15,7 +15,7 @@ public void NotConfiguredProxyFactoryFactory()
{
var bcp = new BytecodeProviderImpl();
IProxyFactoryFactory p = bcp.ProxyFactoryFactory;
- p.Should().Be.InstanceOf();
+ Assert.That(p, Is.InstanceOf());
}
[Test]
diff --git a/src/NHibernate.Test/CfgTest/AccessorsSerializableTest.cs b/src/NHibernate.Test/CfgTest/AccessorsSerializableTest.cs
index 5202bccc2b5..e09db5cfbbe 100644
--- a/src/NHibernate.Test/CfgTest/AccessorsSerializableTest.cs
+++ b/src/NHibernate.Test/CfgTest/AccessorsSerializableTest.cs
@@ -13,7 +13,7 @@ public class AccessorsSerializableTest
[Test, TestCaseSource("accessors")]
public void AllAccessorsAreMarkedAsSerializable(System.Type concreteAccessor)
{
- concreteAccessor.Should().Have.Attribute();
+ Assert.That(concreteAccessor, Has.Attribute());
}
private static System.Type[] setters = typeof(ISetter).Assembly.GetTypes().Where(t => t.Namespace == typeof(ISetter).Namespace && t.GetInterfaces().Contains(typeof(ISetter))).ToArray();
@@ -21,7 +21,7 @@ public void AllAccessorsAreMarkedAsSerializable(System.Type concreteAccessor)
[Test, TestCaseSource("setters")]
public void AllSettersAreMarkedAsSerializable(System.Type concreteAccessor)
{
- concreteAccessor.Should().Have.Attribute();
+ Assert.That(concreteAccessor, Has.Attribute());
}
private static System.Type[] getters = typeof(IGetter).Assembly.GetTypes().Where(t => t.Namespace == typeof(IGetter).Namespace && t.GetInterfaces().Contains(typeof(IGetter))).ToArray();
@@ -29,7 +29,7 @@ public void AllSettersAreMarkedAsSerializable(System.Type concreteAccessor)
[Test, TestCaseSource("getters")]
public void AllGettersAreMarkedAsSerializable(System.Type concreteAccessor)
{
- concreteAccessor.Should().Have.Attribute();
+ Assert.That(concreteAccessor, Has.Attribute());
}
}
}
\ No newline at end of file
diff --git a/src/NHibernate.Test/CfgTest/ConfigurationAddMappingEvents.cs b/src/NHibernate.Test/CfgTest/ConfigurationAddMappingEvents.cs
index 0ce9b2da27c..6eb619e5c95 100644
--- a/src/NHibernate.Test/CfgTest/ConfigurationAddMappingEvents.cs
+++ b/src/NHibernate.Test/CfgTest/ConfigurationAddMappingEvents.cs
@@ -45,15 +45,15 @@ public void WhenSubscribedToBeforeBindThenRaiseEventForEachMapping()
var listOfCalls = new List();
var configuration = new Configuration();
configuration.DataBaseIntegration(x => x.Dialect());
- configuration.BeforeBindMapping += (sender, args) => { sender.Should().Be.SameInstanceAs(configuration); listOfCalls.Add(args); };
+ configuration.BeforeBindMapping += (sender, args) => { Assert.That(sender, Is.SameAs(configuration)); listOfCalls.Add(args); };
configuration.AddXmlString(ProductLineMapping);
configuration.AddXmlString(ModelMapping);
- listOfCalls.Count.Should().Be(2);
- listOfCalls.Select(x => x.FileName).All(x => x.Satisfy(filename => filename != null));
- listOfCalls.Select(x => x.Mapping).All(x => x.Satisfy(mappingDoc => mappingDoc != null));
- listOfCalls.Select(x => x.Dialect).All(x => x.Satisfy(dialect => dialect.GetType() == typeof(MsSql2008Dialect)));
+ Assert.That(listOfCalls.Count, Is.EqualTo(2));
+ Assert.That(listOfCalls.Select(x => x.FileName).All(x => x != null), Is.True);
+ Assert.That(listOfCalls.Select(x => x.Mapping).All(x => x != null), Is.True);
+ Assert.That(listOfCalls.Select(x => x.Dialect).All(x => x.GetType() == typeof (MsSql2008Dialect)), Is.True);
}
[Test]
@@ -62,15 +62,15 @@ public void WhenSubscribedToAfterBindThenRaiseEventForEachMapping()
var listOfCalls = new List();
var configuration = new Configuration();
configuration.DataBaseIntegration(x => x.Dialect());
- configuration.AfterBindMapping += (sender, args) => { sender.Should().Be.SameInstanceAs(configuration); listOfCalls.Add(args); };
+ configuration.AfterBindMapping += (sender, args) => { Assert.That(sender, Is.SameAs(configuration)); listOfCalls.Add(args); };
configuration.AddXmlString(ProductLineMapping);
configuration.AddXmlString(ModelMapping);
- listOfCalls.Count.Should().Be(2);
- listOfCalls.Select(x => x.FileName).All(x => x.Satisfy(filename => filename != null));
- listOfCalls.Select(x => x.Mapping).All(x => x.Satisfy(mappingDoc => mappingDoc != null));
- listOfCalls.Select(x => x.Dialect).All(x => x.Satisfy(dialect => dialect.GetType() == typeof(MsSql2008Dialect)));
+ Assert.That(listOfCalls.Count, Is.EqualTo(2));
+ Assert.That(listOfCalls.Select(x => x.FileName).All(x => x != null), Is.True);
+ Assert.That(listOfCalls.Select(x => x.Mapping).All(x => x != null), Is.True);
+ Assert.That(listOfCalls.Select(x => x.Dialect).All(x => x.GetType() == typeof(MsSql2008Dialect)), Is.True);
}
}
}
\ No newline at end of file
diff --git a/src/NHibernate.Test/CfgTest/ConfigurationSchemaFixture.cs b/src/NHibernate.Test/CfgTest/ConfigurationSchemaFixture.cs
index d318fb4bda1..fbaabb6c1fe 100644
--- a/src/NHibernate.Test/CfgTest/ConfigurationSchemaFixture.cs
+++ b/src/NHibernate.Test/CfgTest/ConfigurationSchemaFixture.cs
@@ -29,7 +29,7 @@ public void InvalidConfig()
public void FromAppConfigTest()
{
IHibernateConfiguration hc = ConfigurationManager.GetSection("hibernate-configuration") as IHibernateConfiguration;
- hc.ByteCodeProviderType.Should().Be("lcg");
+ Assert.That(hc.ByteCodeProviderType, Is.EqualTo("lcg"));
Assert.IsTrue(hc.UseReflectionOptimizer);
Assert.AreEqual("NHibernate.Test", hc.SessionFactory.Name);
}
diff --git a/src/NHibernate.Test/CfgTest/CustomBytecodeProviderTest.cs b/src/NHibernate.Test/CfgTest/CustomBytecodeProviderTest.cs
index 44315a518c8..a3c6be54418 100644
--- a/src/NHibernate.Test/CfgTest/CustomBytecodeProviderTest.cs
+++ b/src/NHibernate.Test/CfgTest/CustomBytecodeProviderTest.cs
@@ -34,29 +34,29 @@ public override IReflectionOptimizer GetReflectionOptimizer(System.Type clazz, I
public void WhenNoShortCutUsedThenCanBuildBytecodeProvider()
{
var properties = new Dictionary { { Environment.PropertyBytecodeProvider, typeof(MyByteCodeProvider).AssemblyQualifiedName } };
- Executing.This(() => Environment.BuildBytecodeProvider(properties)).Should().NotThrow();
+ Assert.That(() => Environment.BuildBytecodeProvider(properties), Throws.Nothing);
}
[Test]
public void WhenNoShortCutUsedThenCanBuildInstanceOfConfiguredBytecodeProvider()
{
var properties = new Dictionary { { Environment.PropertyBytecodeProvider, typeof(MyByteCodeProvider).AssemblyQualifiedName } };
- Environment.BuildBytecodeProvider(properties).Should().Be.InstanceOf();
+ Assert.That(Environment.BuildBytecodeProvider(properties), Is.InstanceOf());
}
[Test]
public void WhenInvalidThenThrow()
{
var properties = new Dictionary { { Environment.PropertyBytecodeProvider, typeof(InvalidByteCodeProvider).AssemblyQualifiedName } };
- Executing.This(() => Environment.BuildBytecodeProvider(properties)).Should().Throw();
+ Assert.That(() => Environment.BuildBytecodeProvider(properties), Throws.TypeOf());
}
[Test]
public void WhenNoDefaultCtorThenThrow()
{
var properties = new Dictionary { { Environment.PropertyBytecodeProvider, typeof(InvalidNoCtorByteCodeProvider).AssemblyQualifiedName } };
- Executing.This(() => Environment.BuildBytecodeProvider(properties)).Should().Throw()
- .And.Exception.InnerException.Message.Should().Contain("constructor was not found");
+ Assert.That(() => Environment.BuildBytecodeProvider(properties), Throws.TypeOf()
+ .And.InnerException.Message.ContainsSubstring("constructor was not found"));
}
}
}
\ No newline at end of file
diff --git a/src/NHibernate.Test/CfgTest/Loquacious/LambdaConfigurationFixture.cs b/src/NHibernate.Test/CfgTest/Loquacious/LambdaConfigurationFixture.cs
index d6147be3933..40a72b1c4b8 100644
--- a/src/NHibernate.Test/CfgTest/Loquacious/LambdaConfigurationFixture.cs
+++ b/src/NHibernate.Test/CfgTest/Loquacious/LambdaConfigurationFixture.cs
@@ -39,29 +39,29 @@ public void FullConfiguration()
p.ProxyFactoryFactory();
});
configure.Mappings(m=>
- {
- m.DefaultCatalog = "MyCatalog";
- m.DefaultSchema = "MySche";
- });
+ {
+ m.DefaultCatalog = "MyCatalog";
+ m.DefaultSchema = "MySche";
+ });
configure.DataBaseIntegration(db =>
- {
- db.Dialect();
- db.KeywordsAutoImport = Hbm2DDLKeyWords.AutoQuote;
- db.Batcher();
- db.BatchSize = 15;
- db.ConnectionProvider();
- db.Driver();
- db.ConnectionReleaseMode = ConnectionReleaseMode.AfterTransaction;
- db.IsolationLevel = IsolationLevel.ReadCommitted;
- db.ConnectionString = "The connection string";
- db.AutoCommentSql = true;
- db.ExceptionConverter();
- db.PrepareCommands = true;
- db.Timeout = 10;
- db.MaximumDepthOfOuterJoinFetching = 11;
- db.HqlToSqlSubstitutions = "true 1, false 0, yes 'Y', no 'N'";
- db.SchemaAction = SchemaAutoAction.Validate;
- });
+ {
+ db.Dialect();
+ db.KeywordsAutoImport = Hbm2DDLKeyWords.AutoQuote;
+ db.Batcher();
+ db.BatchSize = 15;
+ db.ConnectionProvider();
+ db.Driver();
+ db.ConnectionReleaseMode = ConnectionReleaseMode.AfterTransaction;
+ db.IsolationLevel = IsolationLevel.ReadCommitted;
+ db.ConnectionString = "The connection string";
+ db.AutoCommentSql = true;
+ db.ExceptionConverter();
+ db.PrepareCommands = true;
+ db.Timeout = 10;
+ db.MaximumDepthOfOuterJoinFetching = 11;
+ db.HqlToSqlSubstitutions = "true 1, false 0, yes 'Y', no 'N'";
+ db.SchemaAction = SchemaAutoAction.Validate;
+ });
Assert.That(configure.Properties[Environment.SessionFactoryName], Is.EqualTo("SomeName"));
Assert.That(configure.Properties[Environment.CacheProvider],
@@ -102,7 +102,7 @@ public void FullConfiguration()
Assert.That(configure.Properties[Environment.MaxFetchDepth], Is.EqualTo("11"));
Assert.That(configure.Properties[Environment.QuerySubstitutions], Is.EqualTo("true 1, false 0, yes 'Y', no 'N'"));
Assert.That(configure.Properties[Environment.Hbm2ddlAuto], Is.EqualTo("validate"));
- configure.Properties[Environment.LinqToHqlGeneratorsRegistry].Should().Be(typeof(DefaultLinqToHqlGeneratorsRegistry).AssemblyQualifiedName);
+ Assert.That(configure.Properties[Environment.LinqToHqlGeneratorsRegistry], Is.EqualTo(typeof(DefaultLinqToHqlGeneratorsRegistry).AssemblyQualifiedName));
}
}
}
\ No newline at end of file
diff --git a/src/NHibernate.Test/CfgTest/Loquacious/NamedQueryTests.cs b/src/NHibernate.Test/CfgTest/Loquacious/NamedQueryTests.cs
index 0e7ff97a812..d526081de47 100644
--- a/src/NHibernate.Test/CfgTest/Loquacious/NamedQueryTests.cs
+++ b/src/NHibernate.Test/CfgTest/Loquacious/NamedQueryTests.cs
@@ -16,9 +16,9 @@ public void AddSimpleNamedQuery()
b.Query = "from System.Object o";
});
- configure.NamedQueries.Should().Have.Count.EqualTo(1);
- configure.NamedQueries.Keys.Single().Should().Be("aQuery");
- configure.NamedQueries.Values.Single().Query.Should().Be("from System.Object o");
+ Assert.That(configure.NamedQueries, Has.Count.EqualTo(1));
+ Assert.That(configure.NamedQueries.Keys.Single(), Is.EqualTo("aQuery"));
+ Assert.That(configure.NamedQueries.Values.Single().Query, Is.EqualTo("from System.Object o"));
}
[Test]
@@ -31,7 +31,7 @@ public void WhenSetInvalidFetchSizeThenLeaveDefault()
b.FetchSize = 0;
});
- configure.NamedQueries.Values.Single().FetchSize.Should().Be(-1);
+ Assert.That(configure.NamedQueries.Values.Single().FetchSize, Is.EqualTo(-1));
}
[Test]
@@ -44,7 +44,7 @@ public void WhenSetValidFetchSizeThenSetValue()
b.FetchSize = 15;
});
- configure.NamedQueries.Values.Single().FetchSize.Should().Be(15);
+ Assert.That(configure.NamedQueries.Values.Single().FetchSize, Is.EqualTo(15));
}
[Test]
@@ -57,7 +57,7 @@ public void WhenSetInvalidTimeoutThenLeaveDefault()
b.Timeout = 0;
});
- configure.NamedQueries.Values.Single().Timeout.Should().Be(-1);
+ Assert.That(configure.NamedQueries.Values.Single().Timeout, Is.EqualTo(-1));
}
[Test]
@@ -70,7 +70,7 @@ public void WhenSetValidTimeoutThenSetValue()
b.Timeout = 123;
});
- configure.NamedQueries.Values.Single().Timeout.Should().Be(123);
+ Assert.That(configure.NamedQueries.Values.Single().Timeout, Is.EqualTo(123));
}
}
}
\ No newline at end of file
diff --git a/src/NHibernate.Test/Criteria/Lambda/ExpressionProcessorFixture.cs b/src/NHibernate.Test/Criteria/Lambda/ExpressionProcessorFixture.cs
index 5897f0aa645..cc0b2ab4ce3 100644
--- a/src/NHibernate.Test/Criteria/Lambda/ExpressionProcessorFixture.cs
+++ b/src/NHibernate.Test/Criteria/Lambda/ExpressionProcessorFixture.cs
@@ -335,7 +335,7 @@ public void TestSignatureNonGeneric()
{
MethodInfo thisMethod = GetType().GetMethod("NonGenericMethod");
- ExpressionProcessor.Signature(thisMethod).Should().Be("NHibernate.Test.Criteria.Lambda.ExpressionProcessorFixture:Void NonGenericMethod(System.String)");
+ Assert.That(ExpressionProcessor.Signature(thisMethod), Is.EqualTo("NHibernate.Test.Criteria.Lambda.ExpressionProcessorFixture:Void NonGenericMethod(System.String)"));
}
[Test]
@@ -343,7 +343,7 @@ public void TestSignatureGeneric()
{
MethodInfo thisMethod = GetType().GetMethod("GenericMethod");
- ExpressionProcessor.Signature(thisMethod).Should().Be("NHibernate.Test.Criteria.Lambda.ExpressionProcessorFixture:T GenericMethod[T](T)");
+ Assert.That(ExpressionProcessor.Signature(thisMethod), Is.EqualTo("NHibernate.Test.Criteria.Lambda.ExpressionProcessorFixture:T GenericMethod[T](T)"));
}
[Test]
@@ -352,7 +352,7 @@ public void TestSignatureQualifiedGeneric()
Expression> expression = () => this.GenericMethod("test");
MethodInfo genericMethodWithQualifiedType = (expression.Body as MethodCallExpression).Method;
- ExpressionProcessor.Signature(genericMethodWithQualifiedType).Should().Be("NHibernate.Test.Criteria.Lambda.ExpressionProcessorFixture:T GenericMethod[T](T)");
+ Assert.That(ExpressionProcessor.Signature(genericMethodWithQualifiedType), Is.EqualTo("NHibernate.Test.Criteria.Lambda.ExpressionProcessorFixture:T GenericMethod[T](T)"));
}
}
diff --git a/src/NHibernate.Test/Criteria/Lambda/FunctionsIntegrationFixture.cs b/src/NHibernate.Test/Criteria/Lambda/FunctionsIntegrationFixture.cs
index f888671293c..14ddeff05ac 100644
--- a/src/NHibernate.Test/Criteria/Lambda/FunctionsIntegrationFixture.cs
+++ b/src/NHibernate.Test/Criteria/Lambda/FunctionsIntegrationFixture.cs
@@ -52,8 +52,8 @@ public void YearPartEqual()
.Where(p => p.BirthDate.YearPart() == 2008)
.List();
- persons.Count.Should().Be(1);
- persons[0].Name.Should().Be("p2");
+ Assert.That(persons.Count, Is.EqualTo(1));
+ Assert.That(persons[0].Name, Is.EqualTo("p2"));
}
}
@@ -68,9 +68,9 @@ public void YearPartIsIn()
.OrderBy(p => p.Name).Asc
.List();
- persons.Count.Should().Be(2);
- persons[0].Name.Should().Be("p1");
- persons[1].Name.Should().Be("p2");
+ Assert.That(persons.Count, Is.EqualTo(2));
+ Assert.That(persons[0].Name, Is.EqualTo("p1"));
+ Assert.That(persons[1].Name, Is.EqualTo("p2"));
}
}
@@ -85,8 +85,8 @@ public void YearPartSingleOrDefault()
.Select(p => p.BirthDate.YearPart())
.SingleOrDefault