diff --git a/ShowBuildMenu.bat b/ShowBuildMenu.bat index e859d4c304d..8f5faa1007f 100644 --- a/ShowBuildMenu.bat +++ b/ShowBuildMenu.bat @@ -5,7 +5,7 @@ set NANT="%~dp0Tools\nant\bin\NAnt.exe" -t:net-4.0 set BUILDTOOL="%~dp0Tools\BuildTool\bin\Release\BuildTool.exe" set AVAILABLE_CONFIGURATIONS=%~dp0available-test-configurations set CURRENT_CONFIGURATION=%~dp0current-test-configuration -set NUNIT="%~dp0Tools\nunit\nunit-x86.exe" +set NUNIT="%~dp0Tools\NUnit.ConsoleRunner.3.6.0\tools\nunit3-console.exe" :main-menu echo ========================= NHIBERNATE BUILD MENU ========================== @@ -161,7 +161,7 @@ echo Configuration activated. goto main-menu :test-run -start "" %NUNIT% NHibernate.nunit +start "nunit3-console" cmd /K %NUNIT% --x86 --agents=1 --process=separate NHibernate.nunit goto main-menu rem :build-test diff --git a/Tools/.gitignore b/Tools/.gitignore index aaf208d49ac..8ebf927cc77 100644 --- a/Tools/.gitignore +++ b/Tools/.gitignore @@ -1 +1,2 @@ nuget.exe +NUnit.* diff --git a/Tools/nunit/NUnitFitTests.html b/Tools/nunit/NUnitFitTests.html deleted file mode 100644 index ca5cd4ff70d..00000000000 --- a/Tools/nunit/NUnitFitTests.html +++ /dev/null @@ -1,277 +0,0 @@ - - - -

NUnit Acceptance Tests

-

- Developers love self-referential programs! Hence, NUnit has always run all it's - own tests, even those that are not really unit tests. -

Now, beginning with NUnit 2.4, NUnit has top-level tests using Ward Cunningham's - FIT framework. At this time, the tests are pretty rudimentary, but it's a start - and it's a framework for doing more. -

Running the Tests

-

Open a console or shell window and navigate to the NUnit bin directory, which - contains this file. To run the test under Microsoft .Net, enter the command -

    runFile NUnitFitTests.html TestResults.html .
- To run it under Mono, enter -
    mono runFile.exe NUnitFitTests.html TestResults.html .
- Note the space and dot at the end of each command. The results of your test - will be in TestResults.html in the same directory. -

Platform and CLR Version

- - - - -
NUnit.Fixtures.PlatformInfo
-

Verify Unit Tests

-

- Load and run the NUnit unit tests, verifying that the results are as expected. - When these tests are run on different platforms, different numbers of tests may - be skipped, so the values for Skipped and Run tests are informational only. -

- The number of tests in each assembly should be constant across all platforms - - any discrepancy usually means that one of the test source files was not - compiled on the platform. There should be no failures and no tests ignored. -

Note: - At the moment, the nunit.extensions.tests assembly is failing because the - fixture doesn't initialize addins in the test domain. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NUnit.Fixtures.AssemblyRunner
AssemblyTests()Run()Skipped()Ignored()Failures()
nunit.framework.tests.dll397  00
nunit.core.tests.dll355  00
nunit.util.tests.dll238  00
nunit.mocks.tests.dll43  00
nunit.extensions.tests.dll5  00
nunit-console.tests.dll40  00
nunit.uikit.tests.dll34  00
nunit-gui.tests.dll15  00
nunit.fixtures.tests.dll6  00
-

Code Snippet Tests

-

- These tests create a test assembly from a snippet of code and then load and run - the tests that it contains, verifying that the structure of the loaded tests is - as expected and that the number of tests run, skipped, ignored or failed is - correct. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NUnit.Fixtures.SnippetRunner
CodeTree()Run()Skipped()Ignored()Failures()
public class TestClass
-{
-}
-
EMPTY0000
using NUnit.Framework;
-
-[TestFixture]
-public class TestClass
-{
-}
-
TestClass0000
using NUnit.Framework;
-
-[TestFixture]
-public class TestClass
-{
-    [Test]
-    public void T1() { }
-    [Test]
-    public void T2() { }
-    [Test]
-    public void T3() { }
-}
-
TestClass
->T1
->T2
->T3
-
3000
using NUnit.Framework;
-
-[TestFixture]
-public class TestClass1
-{
-    [Test]
-    public void T1() { }
-}
-
-[TestFixture]
-public class TestClass2
-{
-    [Test]
-    public void T2() { }
-    [Test]
-    public void T3() { }
-}
-
TestClass1
->T1
-TestClass2
->T2
->T3
-
3000
using NUnit.Framework;
-
-[TestFixture]
-public class TestClass
-{
-    [Test]
-    public void T1() { }
-    [Test, Ignore]
-    public void T2() { }
-    [Test]
-    public void T3() { }
-}
-
TestClass
->T1
->T2
->T3
-
2010
using NUnit.Framework;
-
-[TestFixture]
-public class TestClass
-{
-    [Test]
-    public void T1() { }
-    [Test, Explicit]
-    public void T2() { }
-    [Test]
-    public void T3() { }
-}
-
TestClass
->T1
->T2
->T3
-
2100
-

Summary Information

- - - - -
fit.Summary
- - diff --git a/Tools/nunit/NUnitTests.config b/Tools/nunit/NUnitTests.config deleted file mode 100644 index 72ed67c79a4..00000000000 --- a/Tools/nunit/NUnitTests.config +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tools/nunit/NUnitTests.nunit b/Tools/nunit/NUnitTests.nunit deleted file mode 100644 index 15b98d3f03b..00000000000 --- a/Tools/nunit/NUnitTests.nunit +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/Tools/nunit/agent.conf b/Tools/nunit/agent.conf deleted file mode 100644 index ddbcd8ea6d8..00000000000 --- a/Tools/nunit/agent.conf +++ /dev/null @@ -1,4 +0,0 @@ - - 8080 - . - \ No newline at end of file diff --git a/Tools/nunit/agent.log.conf b/Tools/nunit/agent.log.conf deleted file mode 100644 index b5bcd9da484..00000000000 --- a/Tools/nunit/agent.log.conf +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Tools/nunit/framework/nunit.framework.dll b/Tools/nunit/framework/nunit.framework.dll deleted file mode 100644 index 215767d2fb3..00000000000 Binary files a/Tools/nunit/framework/nunit.framework.dll and /dev/null differ diff --git a/Tools/nunit/framework/nunit.framework.xml b/Tools/nunit/framework/nunit.framework.xml deleted file mode 100644 index 7b0e798cada..00000000000 --- a/Tools/nunit/framework/nunit.framework.xml +++ /dev/null @@ -1,10892 +0,0 @@ - - - - nunit.framework - - - - - Attribute used to apply a category to a test - - - - - The name of the category - - - - - Construct attribute for a given category based on - a name. The name may not contain the characters ',', - '+', '-' or '!'. However, this is not checked in the - constructor since it would cause an error to arise at - as the test was loaded without giving a clear indication - of where the problem is located. The error is handled - in NUnitFramework.cs by marking the test as not - runnable. - - The name of the category - - - - Protected constructor uses the Type name as the name - of the category. - - - - - The name of the category - - - - - Used to mark a field for use as a datapoint when executing a theory - within the same fixture that requires an argument of the field's Type. - - - - - Used to mark an array as containing a set of datapoints to be used - executing a theory within the same fixture that requires an argument - of the Type of the array elements. - - - - - Attribute used to provide descriptive text about a - test case or fixture. - - - - - Construct the attribute - - Text describing the test - - - - Gets the test description - - - - - Enumeration indicating how the expected message parameter is to be used - - - - Expect an exact match - - - Expect a message containing the parameter string - - - Match the regular expression provided as a parameter - - - Expect a message that starts with the parameter string - - - - ExpectedExceptionAttribute - - - - - - Constructor for a non-specific exception - - - - - Constructor for a given type of exception - - The type of the expected exception - - - - Constructor for a given exception name - - The full name of the expected exception - - - - Gets or sets the expected exception type - - - - - Gets or sets the full Type name of the expected exception - - - - - Gets or sets the expected message text - - - - - Gets or sets the user message displayed in case of failure - - - - - Gets or sets the type of match to be performed on the expected message - - - - - Gets the name of a method to be used as an exception handler - - - - - ExplicitAttribute marks a test or test fixture so that it will - only be run if explicitly executed from the gui or command line - or if it is included by use of a filter. The test will not be - run simply because an enclosing suite is run. - - - - - Default constructor - - - - - Constructor with a reason - - The reason test is marked explicit - - - - The reason test is marked explicit - - - - - Attribute used to mark a test that is to be ignored. - Ignored tests result in a warning message when the - tests are run. - - - - - Constructs the attribute without giving a reason - for ignoring the test. - - - - - Constructs the attribute giving a reason for ignoring the test - - The reason for ignoring the test - - - - The reason for ignoring a test - - - - - Abstract base for Attributes that are used to include tests - in the test run based on environmental settings. - - - - - Constructor with no included items specified, for use - with named property syntax. - - - - - Constructor taking one or more included items - - Comma-delimited list of included items - - - - Name of the item that is needed in order for - a test to run. Multiple itemss may be given, - separated by a comma. - - - - - Name of the item to be excluded. Multiple items - may be given, separated by a comma. - - - - - The reason for including or excluding the test - - - - - PlatformAttribute is used to mark a test fixture or an - individual method as applying to a particular platform only. - - - - - Constructor with no platforms specified, for use - with named property syntax. - - - - - Constructor taking one or more platforms - - Comma-deliminted list of platforms - - - - CultureAttribute is used to mark a test fixture or an - individual method as applying to a particular Culture only. - - - - - Constructor with no cultures specified, for use - with named property syntax. - - - - - Constructor taking one or more cultures - - Comma-deliminted list of cultures - - - - Marks a test to use a combinatorial join of any argument data - provided. NUnit will create a test case for every combination of - the arguments provided. This can result in a large number of test - cases and so should be used judiciously. This is the default join - type, so the attribute need not be used except as documentation. - - - - - PropertyAttribute is used to attach information to a test as a name/value pair.. - - - - - Construct a PropertyAttribute with a name and string value - - The name of the property - The property value - - - - Construct a PropertyAttribute with a name and int value - - The name of the property - The property value - - - - Construct a PropertyAttribute with a name and double value - - The name of the property - The property value - - - - Constructor for derived classes that set the - property dictionary directly. - - - - - Constructor for use by derived classes that use the - name of the type as the property name. Derived classes - must ensure that the Type of the property value is - a standard type supported by the BCL. Any custom - types will cause a serialization Exception when - in the client. - - - - - Gets the property dictionary for this attribute - - - - - Default constructor - - - - - Marks a test to use pairwise join of any argument data provided. - NUnit will attempt too excercise every pair of argument values at - least once, using as small a number of test cases as it can. With - only two arguments, this is the same as a combinatorial join. - - - - - Default constructor - - - - - Marks a test to use a sequential join of any argument data - provided. NUnit will use arguements for each parameter in - sequence, generating test cases up to the largest number - of argument values provided and using null for any arguments - for which it runs out of values. Normally, this should be - used with the same number of arguments for each parameter. - - - - - Default constructor - - - - - Summary description for MaxTimeAttribute. - - - - - Construct a MaxTimeAttribute, given a time in milliseconds. - - The maximum elapsed time in milliseconds - - - - RandomAttribute is used to supply a set of random values - to a single parameter of a parameterized test. - - - - - ValuesAttribute is used to provide literal arguments for - an individual parameter of a test. - - - - - Abstract base class for attributes that apply to parameters - and supply data for the parameter. - - - - - Gets the data to be provided to the specified parameter - - - - - The collection of data to be returned. Must - be set by any derived attribute classes. - We use an object[] so that the individual - elements may have their type changed in GetData - if necessary. - - - - - Construct with one argument - - - - - - Construct with two arguments - - - - - - - Construct with three arguments - - - - - - - - Construct with an array of arguments - - - - - - Get the collection of values to be used as arguments - - - - - Construct a set of doubles from 0.0 to 1.0, - specifying only the count. - - - - - - Construct a set of doubles from min to max - - - - - - - - Construct a set of ints from min to max - - - - - - - - Get the collection of values to be used as arguments - - - - - RangeAttribute is used to supply a range of values to an - individual parameter of a parameterized test. - - - - - Construct a range of ints using default step of 1 - - - - - - - Construct a range of ints specifying the step size - - - - - - - - Construct a range of longs - - - - - - - - Construct a range of doubles - - - - - - - - Construct a range of floats - - - - - - - - RepeatAttribute may be applied to test case in order - to run it multiple times. - - - - - Construct a RepeatAttribute - - The number of times to run the test - - - - RequiredAddinAttribute may be used to indicate the names of any addins - that must be present in order to run some or all of the tests in an - assembly. If the addin is not loaded, the entire assembly is marked - as NotRunnable. - - - - - Initializes a new instance of the class. - - The required addin. - - - - Gets the name of required addin. - - The required addin name. - - - - Summary description for SetCultureAttribute. - - - - - Construct given the name of a culture - - - - - - Summary description for SetUICultureAttribute. - - - - - Construct given the name of a culture - - - - - - SetUpAttribute is used in a TestFixture to identify a method - that is called immediately before each test is run. It is - also used in a SetUpFixture to identify the method that is - called once, before any of the subordinate tests are run. - - - - - Attribute used to mark a class that contains one-time SetUp - and/or TearDown methods that apply to all the tests in a - namespace or an assembly. - - - - - Attribute used to mark a static (shared in VB) property - that returns a list of tests. - - - - - Attribute used in a TestFixture to identify a method that is - called immediately after each test is run. It is also used - in a SetUpFixture to identify the method that is called once, - after all subordinate tests have run. In either case, the method - is guaranteed to be called, even if an exception is thrown. - - - - - Provide actions to execute before and after tests. - - - - - When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. - - - - - Executed before each test is run - - Provides details about the test that is going to be run. - - - - Executed after each test is run - - Provides details about the test that has just been run. - - - - Provides the target for the action attribute - - The target for the action attribute - - - - Adding this attribute to a method within a - class makes the method callable from the NUnit test runner. There is a property - called Description which is optional which you can provide a more detailed test - description. This class cannot be inherited. - - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - publc void TestDescriptionMethod() - {} - } - - - - - - Descriptive text for this test - - - - - TestCaseAttribute is used to mark parameterized test cases - and provide them with their arguments. - - - - - The ITestCaseData interface is implemented by a class - that is able to return complete testcases for use by - a parameterized test method. - - NOTE: This interface is used in both the framework - and the core, even though that results in two different - types. However, sharing the source code guarantees that - the various implementations will be compatible and that - the core is able to reflect successfully over the - framework implementations of ITestCaseData. - - - - - Gets the argument list to be provided to the test - - - - - Gets the expected result - - - - - Indicates whether a result has been specified. - This is necessary because the result may be - null, so it's value cannot be checked. - - - - - Gets the expected exception Type - - - - - Gets the FullName of the expected exception - - - - - Gets the name to be used for the test - - - - - Gets the description of the test - - - - - Gets a value indicating whether this is ignored. - - true if ignored; otherwise, false. - - - - Gets a value indicating whether this is explicit. - - true if explicit; otherwise, false. - - - - Gets the ignore reason. - - The ignore reason. - - - - Construct a TestCaseAttribute with a list of arguments. - This constructor is not CLS-Compliant - - - - - - Construct a TestCaseAttribute with a single argument - - - - - - Construct a TestCaseAttribute with a two arguments - - - - - - - Construct a TestCaseAttribute with a three arguments - - - - - - - - Gets the list of arguments to a test case - - - - - Gets or sets the expected result. - - The result. - - - - Gets the expected result. - - The result. - - - - Gets a flag indicating whether an expected - result has been set. - - - - - Gets a list of categories associated with this test; - - - - - Gets or sets the category associated with this test. - May be a single category or a comma-separated list. - - - - - Gets or sets the expected exception. - - The expected exception. - - - - Gets or sets the name the expected exception. - - The expected name of the exception. - - - - Gets or sets the expected message of the expected exception - - The expected message of the exception. - - - - Gets or sets the type of match to be performed on the expected message - - - - - Gets or sets the description. - - The description. - - - - Gets or sets the name of the test. - - The name of the test. - - - - Gets or sets the ignored status of the test - - - - - Gets or sets the ignored status of the test - - - - - Gets or sets the explicit status of the test - - - - - Gets or sets the reason for not running the test - - - - - Gets or sets the reason for not running the test. - Set has the side effect of marking the test as ignored. - - The ignore reason. - - - - FactoryAttribute indicates the source to be used to - provide test cases for a test method. - - - - - Construct with the name of the factory - for use with languages - that don't support params arrays. - - An array of the names of the factories that will provide data - - - - Construct with a Type and name - for use with languages - that don't support params arrays. - - The Type that will provide data - The name of the method, property or field that will provide data - - - - The name of a the method, property or fiend to be used as a source - - - - - A Type to be used as a source - - - - - Gets or sets the category associated with this test. - May be a single category or a comma-separated list. - - - - - [TestFixture] - public class ExampleClass - {} - - - - - Default constructor - - - - - Construct with a object[] representing a set of arguments. - In .NET 2.0, the arguments may later be separated into - type arguments and constructor arguments. - - - - - - Descriptive text for this fixture - - - - - Gets and sets the category for this fixture. - May be a comma-separated list of categories. - - - - - Gets a list of categories for this fixture - - - - - The arguments originally provided to the attribute - - - - - Gets or sets a value indicating whether this should be ignored. - - true if ignore; otherwise, false. - - - - Gets or sets the ignore reason. May set Ignored as a side effect. - - The ignore reason. - - - - Get or set the type arguments. If not set - explicitly, any leading arguments that are - Types are taken as type arguments. - - - - - Attribute used to identify a method that is - called before any tests in a fixture are run. - - - - - Attribute used to identify a method that is called after - all the tests in a fixture have run. The method is - guaranteed to be called, even if an exception is thrown. - - - - - Adding this attribute to a method within a - class makes the method callable from the NUnit test runner. There is a property - called Description which is optional which you can provide a more detailed test - description. This class cannot be inherited. - - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - publc void TestDescriptionMethod() - {} - } - - - - - - Used on a method, marks the test with a timeout value in milliseconds. - The test will be run in a separate thread and is cancelled if the timeout - is exceeded. Used on a method or assembly, sets the default timeout - for all contained test methods. - - - - - Construct a TimeoutAttribute given a time in milliseconds - - The timeout value in milliseconds - - - - Marks a test that must run in the STA, causing it - to run in a separate thread if necessary. - - On methods, you may also use STAThreadAttribute - to serve the same purpose. - - - - - Construct a RequiresSTAAttribute - - - - - Marks a test that must run in the MTA, causing it - to run in a separate thread if necessary. - - On methods, you may also use MTAThreadAttribute - to serve the same purpose. - - - - - Construct a RequiresMTAAttribute - - - - - Marks a test that must run on a separate thread. - - - - - Construct a RequiresThreadAttribute - - - - - Construct a RequiresThreadAttribute, specifying the apartment - - - - - ValueSourceAttribute indicates the source to be used to - provide data for one parameter of a test method. - - - - - Construct with the name of the factory - for use with languages - that don't support params arrays. - - The name of the data source to be used - - - - Construct with a Type and name - for use with languages - that don't support params arrays. - - The Type that will provide data - The name of the method, property or field that will provide data - - - - The name of a the method, property or fiend to be used as a source - - - - - A Type to be used as a source - - - - - AttributeExistsConstraint tests for the presence of a - specified attribute on a Type. - - - - - The Constraint class is the base of all built-in constraints - within NUnit. It provides the operator overloads used to combine - constraints. - - - - - The IConstraintExpression interface is implemented by all - complete and resolvable constraints and expressions. - - - - - Return the top-level constraint for this expression - - - - - - Static UnsetObject used to detect derived constraints - failing to set the actual value. - - - - - The actual value being tested against a constraint - - - - - The display name of this Constraint for use by ToString() - - - - - Argument fields used by ToString(); - - - - - The builder holding this constraint - - - - - Construct a constraint with no arguments - - - - - Construct a constraint with one argument - - - - - Construct a constraint with two arguments - - - - - Sets the ConstraintBuilder holding this constraint - - - - - Write the failure message to the MessageWriter provided - as an argument. The default implementation simply passes - the constraint and the actual value to the writer, which - then displays the constraint description and the value. - - Constraints that need to provide additional details, - such as where the error occured can override this. - - The MessageWriter on which to display the message - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Test whether the constraint is satisfied by an - ActualValueDelegate that returns the value to be tested. - The default implementation simply evaluates the delegate - but derived classes may override it to provide for delayed - processing. - - An ActualValueDelegate - True for success, false for failure - - - - Test whether the constraint is satisfied by a given reference. - The default implementation simply dereferences the value but - derived classes may override it to provide for delayed processing. - - A reference to the value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Default override of ToString returns the constraint DisplayName - followed by any arguments within angle brackets. - - - - - - Returns the string representation of this constraint - - - - - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. - - - - - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. - - - - - This operator creates a constraint that is satisfied if the - argument constraint is not satisfied. - - - - - Returns a DelayedConstraint with the specified delay time. - - The delay in milliseconds. - - - - - Returns a DelayedConstraint with the specified delay time - and polling interval. - - The delay in milliseconds. - The interval at which to test the constraint. - - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - Returns a ConstraintExpression by appending And - to the current constraint. - - - - - Returns a ConstraintExpression by appending And - to the current constraint. - - - - - Returns a ConstraintExpression by appending Or - to the current constraint. - - - - - Class used to detect any derived constraints - that fail to set the actual value in their - Matches override. - - - - - Constructs an AttributeExistsConstraint for a specific attribute Type - - - - - - Tests whether the object provides the expected attribute. - - A Type, MethodInfo, or other ICustomAttributeProvider - True if the expected attribute is present, otherwise false - - - - Writes the description of the constraint to the specified writer - - - - - AttributeConstraint tests that a specified attribute is present - on a Type or other provider and that the value of the attribute - satisfies some other constraint. - - - - - Abstract base class used for prefixes - - - - - The base constraint - - - - - Construct given a base constraint - - - - - - Constructs an AttributeConstraint for a specified attriute - Type and base constraint. - - - - - - - Determines whether the Type or other provider has the - expected attribute and if its value matches the - additional constraint specified. - - - - - Writes a description of the attribute to the specified writer. - - - - - Writes the actual value supplied to the specified writer. - - - - - Returns a string representation of the constraint. - - - - - BasicConstraint is the abstract base for constraints that - perform a simple comparison to a constant value. - - - - - Initializes a new instance of the class. - - The expected. - The description. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - NullConstraint tests that the actual value is null - - - - - Initializes a new instance of the class. - - - - - TrueConstraint tests that the actual value is true - - - - - Initializes a new instance of the class. - - - - - FalseConstraint tests that the actual value is false - - - - - Initializes a new instance of the class. - - - - - NaNConstraint tests that the actual value is a double or float NaN - - - - - Test that the actual value is an NaN - - - - - - - Write the constraint description to a specified writer - - - - - - BinaryConstraint is the abstract base of all constraints - that combine two other constraints in some fashion. - - - - - The first constraint being combined - - - - - The second constraint being combined - - - - - Construct a BinaryConstraint from two other constraints - - The first constraint - The second constraint - - - - AndConstraint succeeds only if both members succeed. - - - - - Create an AndConstraint from two other constraints - - The first constraint - The second constraint - - - - Apply both member constraints to an actual value, succeeding - succeeding only if both of them succeed. - - The actual value - True if the constraints both succeeded - - - - Write a description for this contraint to a MessageWriter - - The MessageWriter to receive the description - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - OrConstraint succeeds if either member succeeds - - - - - Create an OrConstraint from two other constraints - - The first constraint - The second constraint - - - - Apply the member constraints to an actual value, succeeding - succeeding as soon as one of them succeeds. - - The actual value - True if either constraint succeeded - - - - Write a description for this contraint to a MessageWriter - - The MessageWriter to receive the description - - - - CollectionConstraint is the abstract base class for - constraints that operate on collections. - - - - - Construct an empty CollectionConstraint - - - - - Construct a CollectionConstraint - - - - - - Determines whether the specified enumerable is empty. - - The enumerable. - - true if the specified enumerable is empty; otherwise, false. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Protected method to be implemented by derived classes - - - - - - - CollectionItemsEqualConstraint is the abstract base class for all - collection constraints that apply some notion of item equality - as a part of their operation. - - - - - Construct an empty CollectionConstraint - - - - - Construct a CollectionConstraint - - - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied Comparison object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Compares two collection members for equality - - - - - Return a new CollectionTally for use in making tests - - The collection to be included in the tally - - - - Flag the constraint to ignore case and return self. - - - - - EmptyCollectionConstraint tests whether a collection is empty. - - - - - Check that the collection is empty - - - - - - - Write the constraint description to a MessageWriter - - - - - - UniqueItemsConstraint tests whether all the items in a - collection are unique. - - - - - Check that all items are unique. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - CollectionContainsConstraint is used to test whether a collection - contains an expected object as a member. - - - - - Construct a CollectionContainsConstraint - - - - - - Test whether the expected item is contained in the collection - - - - - - - Write a descripton of the constraint to a MessageWriter - - - - - - CollectionEquivalentCOnstraint is used to determine whether two - collections are equivalent. - - - - - Construct a CollectionEquivalentConstraint - - - - - - Test whether two collections are equivalent - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - CollectionSubsetConstraint is used to determine whether - one collection is a subset of another - - - - - Construct a CollectionSubsetConstraint - - The collection that the actual value is expected to be a subset of - - - - Test whether the actual collection is a subset of - the expected collection provided. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - CollectionOrderedConstraint is used to test whether a collection is ordered. - - - - - Construct a CollectionOrderedConstraint - - - - - Modifies the constraint to use an IComparer and returns self. - - - - - Modifies the constraint to use an IComparer<T> and returns self. - - - - - Modifies the constraint to use a Comparison<T> and returns self. - - - - - Modifies the constraint to test ordering by the value of - a specified property and returns self. - - - - - Test whether the collection is ordered - - - - - - - Write a description of the constraint to a MessageWriter - - - - - - Returns the string representation of the constraint. - - - - - - If used performs a reverse comparison - - - - - CollectionTally counts (tallies) the number of - occurences of each object in one or more enumerations. - - - - - Construct a CollectionTally object from a comparer and a collection - - - - - Try to remove an object from the tally - - The object to remove - True if successful, false if the object was not found - - - - Try to remove a set of objects from the tally - - The objects to remove - True if successful, false if any object was not found - - - - The number of objects remaining in the tally - - - - - ComparisonAdapter class centralizes all comparisons of - values in NUnit, adapting to the use of any provided - IComparer, IComparer<T> or Comparison<T> - - - - - Returns a ComparisonAdapter that wraps an IComparer - - - - - Returns a ComparisonAdapter that wraps an IComparer<T> - - - - - Returns a ComparisonAdapter that wraps a Comparison<T> - - - - - Compares two objects - - - - - Gets the default ComparisonAdapter, which wraps an - NUnitComparer object. - - - - - Construct a ComparisonAdapter for an IComparer - - - - - Compares two objects - - - - - - - - Construct a default ComparisonAdapter - - - - - ComparisonAdapter<T> extends ComparisonAdapter and - allows use of an IComparer<T> or Comparison<T> - to actually perform the comparison. - - - - - Construct a ComparisonAdapter for an IComparer<T> - - - - - Compare a Type T to an object - - - - - Construct a ComparisonAdapter for a Comparison<T> - - - - - Compare a Type T to an object - - - - - Abstract base class for constraints that compare values to - determine if one is greater than, equal to or less than - the other. This class supplies the Using modifiers. - - - - - ComparisonAdapter to be used in making the comparison - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - - - - Modifies the constraint to use an IComparer and returns self - - - - - Modifies the constraint to use an IComparer<T> and returns self - - - - - Modifies the constraint to use a Comparison<T> and returns self - - - - - Delegate used to delay evaluation of the actual value - to be used in evaluating a constraint - - - - - ConstraintBuilder maintains the stacks that are used in - processing a ConstraintExpression. An OperatorStack - is used to hold operators that are waiting for their - operands to be reognized. a ConstraintStack holds - input constraints as well as the results of each - operator applied. - - - - - Initializes a new instance of the class. - - - - - Appends the specified operator to the expression by first - reducing the operator stack and then pushing the new - operator on the stack. - - The operator to push. - - - - Appends the specified constraint to the expresson by pushing - it on the constraint stack. - - The constraint to push. - - - - Sets the top operator right context. - - The right context. - - - - Reduces the operator stack until the topmost item - precedence is greater than or equal to the target precedence. - - The target precedence. - - - - Resolves this instance, returning a Constraint. If the builder - is not currently in a resolvable state, an exception is thrown. - - The resolved constraint - - - - Gets a value indicating whether this instance is resolvable. - - - true if this instance is resolvable; otherwise, false. - - - - - OperatorStack is a type-safe stack for holding ConstraintOperators - - - - - Initializes a new instance of the class. - - The builder. - - - - Pushes the specified operator onto the stack. - - The op. - - - - Pops the topmost operator from the stack. - - - - - - Gets a value indicating whether this is empty. - - true if empty; otherwise, false. - - - - Gets the topmost operator without modifying the stack. - - The top. - - - - ConstraintStack is a type-safe stack for holding Constraints - - - - - Initializes a new instance of the class. - - The builder. - - - - Pushes the specified constraint. As a side effect, - the constraint's builder field is set to the - ConstraintBuilder owning this stack. - - The constraint. - - - - Pops this topmost constrait from the stack. - As a side effect, the constraint's builder - field is set to null. - - - - - - Gets a value indicating whether this is empty. - - true if empty; otherwise, false. - - - - Gets the topmost constraint without modifying the stack. - - The topmost constraint - - - - ConstraintExpression represents a compound constraint in the - process of being constructed from a series of syntactic elements. - - Individual elements are appended to the expression as they are - reognized. Once an actual Constraint is appended, the expression - returns a resolvable Constraint. - - - - - ConstraintExpressionBase is the abstract base class for the - ConstraintExpression class, which represents a - compound constraint in the process of being constructed - from a series of syntactic elements. - - NOTE: ConstraintExpressionBase is separate because the - ConstraintExpression class was generated in earlier - versions of NUnit. The two classes may be combined - in a future version. - - - - - The ConstraintBuilder holding the elements recognized so far - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. - - The builder. - - - - Returns a string representation of the expression as it - currently stands. This should only be used for testing, - since it has the side-effect of resolving the expression. - - - - - - Appends an operator to the expression and returns the - resulting expression itself. - - - - - Appends a self-resolving operator to the expression and - returns a new ResolvableConstraintExpression. - - - - - Appends a constraint to the expression and returns that - constraint, which is associated with the current state - of the expression being built. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. - - The builder. - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. - - - - - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. - - - - - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. - - - - - Returns a constraint that tests two items for equality - - - - - Returns a constraint that tests that two references are the same object - - - - - Returns a constraint that tests whether the - actual value is greater than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new ContainsConstraint. This constraint - will, in turn, make use of the appropriate second-level - constraint, depending on the type of the actual argument. - This overload is only used if the item sought is a string, - since any other type implies that we are looking for a - collection member. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. - - - - - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the actual value falls - within a specified range. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. - - - - - With is currently a NOP - reserved for future use. - - - - - Returns a constraint that tests for null - - - - - Returns a constraint that tests for True - - - - - Returns a constraint that tests for False - - - - - Returns a constraint that tests for a positive value - - - - - Returns a constraint that tests for a negative value - - - - - Returns a constraint that tests for NaN - - - - - Returns a constraint that tests for empty - - - - - Returns a constraint that tests whether a collection - contains all unique items. - - - - - Returns a constraint that tests whether an object graph is serializable in binary format. - - - - - Returns a constraint that tests whether an object graph is serializable in xml format. - - - - - Returns a constraint that tests whether a collection is ordered - - - - - Helper class with properties and methods that supply - a number of constraints used in Asserts. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. - - - - - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a constraint that tests two items for equality - - - - - Returns a constraint that tests that two references are the same object - - - - - Returns a constraint that tests whether the - actual value is greater than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new ContainsConstraint. This constraint - will, in turn, make use of the appropriate second-level - constraint, depending on the type of the actual argument. - This overload is only used if the item sought is a string, - since any other type implies that we are looking for a - collection member. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. - - - - - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. - - - - - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the actual value falls - within a specified range. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. - - - - - Returns a constraint that tests for null - - - - - Returns a constraint that tests for True - - - - - Returns a constraint that tests for False - - - - - Returns a constraint that tests for a positive value - - - - - Returns a constraint that tests for a negative value - - - - - Returns a constraint that tests for NaN - - - - - Returns a constraint that tests for empty - - - - - Returns a constraint that tests whether a collection - contains all unique items. - - - - - Returns a constraint that tests whether an object graph is serializable in binary format. - - - - - Returns a constraint that tests whether an object graph is serializable in xml format. - - - - - Returns a constraint that tests whether a collection is ordered - - - - - The ConstraintOperator class is used internally by a - ConstraintBuilder to represent an operator that - modifies or combines constraints. - - Constraint operators use left and right precedence - values to determine whether the top operator on the - stack should be reduced before pushing a new operator. - - - - - The precedence value used when the operator - is about to be pushed to the stack. - - - - - The precedence value used when the operator - is on the top of the stack. - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - The syntax element preceding this operator - - - - - The syntax element folowing this operator - - - - - The precedence value used when the operator - is about to be pushed to the stack. - - - - - The precedence value used when the operator - is on the top of the stack. - - - - - PrefixOperator takes a single constraint and modifies - it's action in some way. - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - Returns the constraint created by applying this - prefix to another constraint. - - - - - - - Negates the test of the constraint it wraps. - - - - - Constructs a new NotOperator - - - - - Returns a NotConstraint applied to its argument. - - - - - Abstract base for operators that indicate how to - apply a constraint to items in a collection. - - - - - Constructs a CollectionOperator - - - - - Represents a constraint that succeeds if all the - members of a collection match a base constraint. - - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - they all succeed. - - - - - Represents a constraint that succeeds if any of the - members of a collection match a base constraint. - - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - any of them succeed. - - - - - Represents a constraint that succeeds if none of the - members of a collection match a base constraint. - - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. - - - - - Represents a constraint that succeeds if the specified - count of members of a collection match a base constraint. - - - - - Construct an ExactCountOperator for a specified count - - The expected count - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. - - - - - Represents a constraint that simply wraps the - constraint provided as an argument, without any - further functionality, but which modifes the - order of evaluation because of its precedence. - - - - - Constructor for the WithOperator - - - - - Returns a constraint that wraps its argument - - - - - Abstract base class for operators that are able to reduce to a - constraint whether or not another syntactic element follows. - - - - - Operator used to test for the presence of a named Property - on an object and optionally apply further tests to the - value of that property. - - - - - Constructs a PropOperator for a particular named property - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - Gets the name of the property to which the operator applies - - - - - Operator that tests for the presence of a particular attribute - on a type and optionally applies further tests to the attribute. - - - - - Construct an AttributeOperator for a particular Type - - The Type of attribute tested - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - Operator that tests that an exception is thrown and - optionally applies further tests to the exception. - - - - - Construct a ThrowsOperator - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - Abstract base class for all binary operators - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - Abstract method that produces a constraint by applying - the operator to its left and right constraint arguments. - - - - - Gets the left precedence of the operator - - - - - Gets the right precedence of the operator - - - - - Operator that requires both it's arguments to succeed - - - - - Construct an AndOperator - - - - - Apply the operator to produce an AndConstraint - - - - - Operator that requires at least one of it's arguments to succeed - - - - - Construct an OrOperator - - - - - Apply the operator to produce an OrConstraint - - - - - ContainsConstraint tests a whether a string contains a substring - or a collection contains an object. It postpones the decision of - which test to use until the type of the actual argument is known. - This allows testing whether a string is contained in a collection - or as a substring of another string using the same syntax. - - - - - Initializes a new instance of the class. - - The expected. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied Comparison object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to ignore case and return self. - - - - - Applies a delay to the match so that a match can be evaluated in the future. - - - - - Creates a new DelayedConstraint - - The inner constraint two decorate - The time interval after which the match is performed - If the value of is less than 0 - - - - Creates a new DelayedConstraint - - The inner constraint two decorate - The time interval after which the match is performed - The time interval used for polling - If the value of is less than 0 - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for if the base constraint fails, false if it succeeds - - - - Test whether the constraint is satisfied by a delegate - - The delegate whose value is to be tested - True for if the base constraint fails, false if it succeeds - - - - Test whether the constraint is satisfied by a given reference. - Overridden to wait for the specified delay period before - calling the base constraint with the dereferenced value. - - A reference to the value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a MessageWriter. - - The writer on which the actual value is displayed - - - - Returns the string representation of the constraint. - - - - - EmptyDirectoryConstraint is used to test that a directory is empty - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - EmptyConstraint tests a whether a string or collection is empty, - postponing the decision about which test is applied until the - type of the actual argument is known. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - EqualConstraint is able to compare an actual value with the - expected value provided in its constructor. Two objects are - considered equal if both are null, or if both have the same - value. NUnit has special semantics for some object types. - - - - - If true, strings in error messages will be clipped - - - - - NUnitEqualityComparer used to test equality. - - - - - Initializes a new instance of the class. - - The expected value. - - - - Flag the constraint to use a tolerance when determining equality. - - Tolerance value to be used - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied Comparison object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write a failure message. Overridden to provide custom - failure messages for EqualConstraint. - - The MessageWriter to write to - - - - Write description of this constraint - - The MessageWriter to write to - - - - Display the failure information for two collections that did not match. - - The MessageWriter on which to display - The expected collection. - The actual collection - The depth of this failure in a set of nested collections - - - - Displays a single line showing the types and sizes of the expected - and actual enumerations, collections or arrays. If both are identical, - the value is only shown once. - - The MessageWriter on which to display - The expected collection or array - The actual collection or array - The indentation level for the message line - - - - Displays a single line showing the point in the expected and actual - arrays at which the comparison failed. If the arrays have different - structures or dimensions, both values are shown. - - The MessageWriter on which to display - The expected array - The actual array - Index of the failure point in the underlying collections - The indentation level for the message line - - - - Display the failure information for two IEnumerables that did not match. - - The MessageWriter on which to display - The expected enumeration. - The actual enumeration - The depth of this failure in a set of nested collections - - - - Flag the constraint to ignore case and return self. - - - - - Flag the constraint to suppress string clipping - and return self. - - - - - Flag the constraint to compare arrays as collections - and return self. - - - - - Switches the .Within() modifier to interpret its tolerance as - a distance in representable values (see remarks). - - Self. - - Ulp stands for "unit in the last place" and describes the minimum - amount a given value can change. For any integers, an ulp is 1 whole - digit. For floating point values, the accuracy of which is better - for smaller numbers and worse for larger numbers, an ulp depends - on the size of the number. Using ulps for comparison of floating - point results instead of fixed tolerances is safer because it will - automatically compensate for the added inaccuracy of larger numbers. - - - - - Switches the .Within() modifier to interpret its tolerance as - a percentage that the actual values is allowed to deviate from - the expected value. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in days. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in hours. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in minutes. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in seconds. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in milliseconds. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in clock ticks. - - Self - - - - EqualityAdapter class handles all equality comparisons - that use an IEqualityComparer, IEqualityComparer<T> - or a ComparisonAdapter. - - - - - Compares two objects, returning true if they are equal - - - - - Returns true if the two objects can be compared by this adapter. - The base adapter cannot handle IEnumerables except for strings. - - - - - Returns an EqualityAdapter that wraps an IComparer. - - - - - Returns an EqualityAdapter that wraps an IEqualityComparer. - - - - - Returns an EqualityAdapter that wraps an IEqualityComparer<T>. - - - - - Returns an EqualityAdapter that wraps an IComparer<T>. - - - - - Returns an EqualityAdapter that wraps a Comparison<T>. - - - - - EqualityAdapter that wraps an IComparer. - - - - - Returns true if the two objects can be compared by this adapter. - Generic adapter requires objects of the specified type. - - - - - EqualityAdapter that wraps an IComparer. - - - - Helper routines for working with floating point numbers - - - The floating point comparison code is based on this excellent article: - http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm - - - "ULP" means Unit in the Last Place and in the context of this library refers to - the distance between two adjacent floating point numbers. IEEE floating point - numbers can only represent a finite subset of natural numbers, with greater - accuracy for smaller numbers and lower accuracy for very large numbers. - - - If a comparison is allowed "2 ulps" of deviation, that means the values are - allowed to deviate by up to 2 adjacent floating point values, which might be - as low as 0.0000001 for small numbers or as high as 10.0 for large numbers. - - - - - Compares two floating point values for equality - First floating point value to be compared - Second floating point value t be compared - - Maximum number of representable floating point values that are allowed to - be between the left and the right floating point values - - True if both numbers are equal or close to being equal - - - Floating point values can only represent a finite subset of natural numbers. - For example, the values 2.00000000 and 2.00000024 can be stored in a float, - but nothing inbetween them. - - - This comparison will count how many possible floating point values are between - the left and the right number. If the number of possible values between both - numbers is less than or equal to maxUlps, then the numbers are considered as - being equal. - - - Implementation partially follows the code outlined here: - http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ - - - - - Compares two double precision floating point values for equality - First double precision floating point value to be compared - Second double precision floating point value t be compared - - Maximum number of representable double precision floating point values that are - allowed to be between the left and the right double precision floating point values - - True if both numbers are equal or close to being equal - - - Double precision floating point values can only represent a limited series of - natural numbers. For example, the values 2.0000000000000000 and 2.0000000000000004 - can be stored in a double, but nothing inbetween them. - - - This comparison will count how many possible double precision floating point - values are between the left and the right number. If the number of possible - values between both numbers is less than or equal to maxUlps, then the numbers - are considered as being equal. - - - Implementation partially follows the code outlined here: - http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ - - - - - - Reinterprets the memory contents of a floating point value as an integer value - - - Floating point value whose memory contents to reinterpret - - - The memory contents of the floating point value interpreted as an integer - - - - - Reinterprets the memory contents of a double precision floating point - value as an integer value - - - Double precision floating point value whose memory contents to reinterpret - - - The memory contents of the double precision floating point value - interpreted as an integer - - - - - Reinterprets the memory contents of an integer as a floating point value - - Integer value whose memory contents to reinterpret - - The memory contents of the integer value interpreted as a floating point value - - - - - Reinterprets the memory contents of an integer value as a double precision - floating point value - - Integer whose memory contents to reinterpret - - The memory contents of the integer interpreted as a double precision - floating point value - - - - Union of a floating point variable and an integer - - - The union's value as a floating point variable - - - The union's value as an integer - - - The union's value as an unsigned integer - - - Union of a double precision floating point variable and a long - - - The union's value as a double precision floating point variable - - - The union's value as a long - - - The union's value as an unsigned long - - - - Tests whether a value is greater than the value supplied to its constructor - - - - - The value against which a comparison is to be made - - - - - Initializes a new instance of the class. - - The expected value. - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Tests whether a value is greater than or equal to the value supplied to its constructor - - - - - The value against which a comparison is to be made - - - - - Initializes a new instance of the class. - - The expected value. - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Tests whether a value is less than the value supplied to its constructor - - - - - The value against which a comparison is to be made - - - - - Initializes a new instance of the class. - - The expected value. - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Tests whether a value is less than or equal to the value supplied to its constructor - - - - - The value against which a comparison is to be made - - - - - Initializes a new instance of the class. - - The expected value. - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - MessageWriter is the abstract base for classes that write - constraint descriptions and messages in some form. The - class has separate methods for writing various components - of a message, allowing implementations to tailor the - presentation as needed. - - - - - Construct a MessageWriter given a culture - - - - - Method to write single line message with optional args, usually - written to precede the general failure message. - - The message to be written - Any arguments used in formatting the message - - - - Method to write single line message with optional args, usually - written to precede the general failure message, at a givel - indentation level. - - The indentation level of the message - The message to be written - Any arguments used in formatting the message - - - - Display Expected and Actual lines for a constraint. This - is called by MessageWriter's default implementation of - WriteMessageTo and provides the generic two-line display. - - The constraint that failed - - - - Display Expected and Actual lines for given values. This - method may be called by constraints that need more control over - the display of actual and expected values than is provided - by the default implementation. - - The expected value - The actual value causing the failure - - - - Display Expected and Actual lines for given values, including - a tolerance value on the Expected line. - - The expected value - The actual value causing the failure - The tolerance within which the test was made - - - - Display the expected and actual string values on separate lines. - If the mismatch parameter is >=0, an additional line is displayed - line containing a caret that points to the mismatch point. - - The expected string value - The actual string value - The point at which the strings don't match or -1 - If true, case is ignored in locating the point where the strings differ - If true, the strings should be clipped to fit the line - - - - Writes the text for a connector. - - The connector. - - - - Writes the text for a predicate. - - The predicate. - - - - Writes the text for an expected value. - - The expected value. - - - - Writes the text for a modifier - - The modifier. - - - - Writes the text for an actual value. - - The actual value. - - - - Writes the text for a generalized value. - - The value. - - - - Writes the text for a collection value, - starting at a particular point, to a max length - - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write - - - - Abstract method to get the max line length - - - - - Static methods used in creating messages - - - - - Static string used when strings are clipped - - - - - Returns the representation of a type as used in NUnitLite. - This is the same as Type.ToString() except for arrays, - which are displayed with their declared sizes. - - - - - - - Converts any control characters in a string - to their escaped representation. - - The string to be converted - The converted string - - - - Return the a string representation for a set of indices into an array - - Array of indices for which a string is needed - - - - Get an array of indices representing the point in a enumerable, - collection or array corresponding to a single int index into the - collection. - - The collection to which the indices apply - Index in the collection - Array of indices - - - - Clip a string to a given length, starting at a particular offset, returning the clipped - string with ellipses representing the removed parts - - The string to be clipped - The maximum permitted length of the result string - The point at which to start clipping - The clipped string - - - - Clip the expected and actual strings in a coordinated fashion, - so that they may be displayed together. - - - - - - - - - Shows the position two strings start to differ. Comparison - starts at the start index. - - The expected string - The actual string - The index in the strings at which comparison should start - Boolean indicating whether case should be ignored - -1 if no mismatch found, or the index where mismatch found - - - - The Numerics class contains common operations on numeric values. - - - - - Checks the type of the object, returning true if - the object is a numeric type. - - The object to check - true if the object is a numeric type - - - - Checks the type of the object, returning true if - the object is a floating point numeric type. - - The object to check - true if the object is a floating point numeric type - - - - Checks the type of the object, returning true if - the object is a fixed point numeric type. - - The object to check - true if the object is a fixed point numeric type - - - - Test two numeric values for equality, performing the usual numeric - conversions and using a provided or default tolerance. If the tolerance - provided is Empty, this method may set it to a default tolerance. - - The expected value - The actual value - A reference to the tolerance in effect - True if the values are equal - - - - Compare two numeric values, performing the usual numeric conversions. - - The expected value - The actual value - The relationship of the values to each other - - - - NUnitComparer encapsulates NUnit's default behavior - in comparing two objects. - - - - - Compares two objects - - - - - - - - Returns the default NUnitComparer. - - - - - Generic version of NUnitComparer - - - - - - Compare two objects of the same type - - - - - NUnitEqualityComparer encapsulates NUnit's handling of - equality tests between objects. - - - - - - - - - - Compares two objects for equality within a tolerance - - The first object to compare - The second object to compare - The tolerance to use in the comparison - - - - - If true, all string comparisons will ignore case - - - - - If true, arrays will be treated as collections, allowing - those of different dimensions to be compared - - - - - Comparison objects used in comparisons for some constraints. - - - - - Compares two objects for equality within a tolerance. - - - - - Helper method to compare two arrays - - - - - Method to compare two DirectoryInfo objects - - first directory to compare - second directory to compare - true if equivalent, false if not - - - - Returns the default NUnitEqualityComparer - - - - - Gets and sets a flag indicating whether case should - be ignored in determining equality. - - - - - Gets and sets a flag indicating that arrays should be - compared as collections, without regard to their shape. - - - - - Gets and sets an external comparer to be used to - test for equality. It is applied to members of - collections, in place of NUnit's own logic. - - - - - Gets the list of failure points for the last Match performed. - - - - - FailurePoint class represents one point of failure - in an equality test. - - - - - The location of the failure - - - - - The expected value - - - - - The actual value - - - - - Indicates whether the expected value is valid - - - - - Indicates whether the actual value is valid - - - - - PathConstraint serves as the abstract base of constraints - that operate on paths and provides several helper methods. - - - - - The expected path used in the constraint - - - - - The actual path being tested - - - - - Flag indicating whether a caseInsensitive comparison should be made - - - - - Construct a PathConstraint for a give expected path - - The expected path - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Returns true if the expected path and actual path match - - - - - Returns the string representation of this constraint - - - - - Canonicalize the provided path - - - The path in standardized form - - - - Test whether two paths are the same - - The first path - The second path - Indicates whether case should be ignored - - - - - Test whether one path is under another path - - The first path - supposed to be the parent path - The second path - supposed to be the child path - Indicates whether case should be ignored - - - - - Test whether one path is the same as or under another path - - The first path - supposed to be the parent path - The second path - supposed to be the child path - - - - - Modifies the current instance to be case-insensitve - and returns it. - - - - - Modifies the current instance to be case-sensitve - and returns it. - - - - - Summary description for SamePathConstraint. - - - - - Initializes a new instance of the class. - - The expected path - - - - Test whether the constraint is satisfied by a given value - - The expected path - The actual path - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - SubPathConstraint tests that the actual path is under the expected path - - - - - Initializes a new instance of the class. - - The expected path - - - - Test whether the constraint is satisfied by a given value - - The expected path - The actual path - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - SamePathOrUnderConstraint tests that one path is under another - - - - - Initializes a new instance of the class. - - The expected path - - - - Test whether the constraint is satisfied by a given value - - The expected path - The actual path - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Predicate constraint wraps a Predicate in a constraint, - returning success if the predicate is true. - - - - - Construct a PredicateConstraint from a predicate - - - - - Determines whether the predicate succeeds when applied - to the actual value. - - - - - Writes the description to a MessageWriter - - - - - NotConstraint negates the effect of some other constraint - - - - - Initializes a new instance of the class. - - The base constraint to be negated. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for if the base constraint fails, false if it succeeds - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a MessageWriter. - - The writer on which the actual value is displayed - - - - AllItemsConstraint applies another constraint to each - item in a collection, succeeding if they all succeed. - - - - - Construct an AllItemsConstraint on top of an existing constraint - - - - - - Apply the item constraint to each item in the collection, - failing if any item fails. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - SomeItemsConstraint applies another constraint to each - item in a collection, succeeding if any of them succeeds. - - - - - Construct a SomeItemsConstraint on top of an existing constraint - - - - - - Apply the item constraint to each item in the collection, - succeeding if any item succeeds. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - NoItemConstraint applies another constraint to each - item in a collection, failing if any of them succeeds. - - - - - Construct a NoItemConstraint on top of an existing constraint - - - - - - Apply the item constraint to each item in the collection, - failing if any item fails. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - ExactCoutConstraint applies another constraint to each - item in a collection, succeeding only if a specified - number of items succeed. - - - - - Construct an ExactCountConstraint on top of an existing constraint - - - - - - - Apply the item constraint to each item in the collection, - succeeding only if the expected number of items pass. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - PropertyExistsConstraint tests that a named property - exists on the object provided through Match. - - Originally, PropertyConstraint provided this feature - in addition to making optional tests on the vaue - of the property. The two constraints are now separate. - - - - - Initializes a new instance of the class. - - The name of the property. - - - - Test whether the property exists for a given object - - The object to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. - - The writer on which the actual value is displayed - - - - Returns the string representation of the constraint. - - - - - - PropertyConstraint extracts a named property and uses - its value as the actual value for a chained constraint. - - - - - Initializes a new instance of the class. - - The name. - The constraint to apply to the property. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Returns the string representation of the constraint. - - - - - - RangeConstraint tests whethe two values are within a - specified range. - - - - - Initializes a new instance of the class. - - From. - To. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - ResolvableConstraintExpression is used to represent a compound - constraint being constructed at a point where the last operator - may either terminate the expression or may have additional - qualifying constraints added to it. - - It is used, for example, for a Property element or for - an Exception element, either of which may be optionally - followed by constraints that apply to the property or - exception. - - - - - Create a new instance of ResolvableConstraintExpression - - - - - Create a new instance of ResolvableConstraintExpression, - passing in a pre-populated ConstraintBuilder. - - - - - Resolve the current expression to a Constraint - - - - - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. - - - - - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. - - - - - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. - - - - - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. - - - - - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. - - - - - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. - - - - - This operator creates a constraint that is satisfied if the - argument constraint is not satisfied. - - - - - Appends an And Operator to the expression - - - - - Appends an Or operator to the expression. - - - - - ReusableConstraint wraps a resolved constraint so that it - may be saved and reused as needed. - - - - - Construct a ReusableConstraint - - The constraint or expression to be reused - - - - Conversion operator from a normal constraint to a ReusableConstraint. - - The original constraint to be wrapped as a ReusableConstraint - - - - - Returns the string representation of the constraint. - - A string representing the constraint - - - - Resolves the ReusableConstraint by returning the constraint - that it originally wrapped. - - A resolved constraint - - - - SameAsConstraint tests whether an object is identical to - the object passed to its constructor - - - - - Initializes a new instance of the class. - - The expected object. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - BinarySerializableConstraint tests whether - an object is serializable in binary format. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Returns the string representation - - - - - BinarySerializableConstraint tests whether - an object is serializable in binary format. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Returns the string representation of this constraint - - - - - StringConstraint is the abstract base for constraints - that operate on strings. It supports the IgnoreCase - modifier for string operations. - - - - - The expected value - - - - - Indicates whether tests should be case-insensitive - - - - - Constructs a StringConstraint given an expected value - - The expected value - - - - Modify the constraint to ignore case in matching. - - - - - EmptyStringConstraint tests whether a string is empty. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - NullEmptyStringConstraint tests whether a string is either null or empty. - - - - - Constructs a new NullOrEmptyStringConstraint - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - SubstringConstraint can test whether a string contains - the expected substring. - - - - - Initializes a new instance of the class. - - The expected. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - StartsWithConstraint can test whether a string starts - with an expected substring. - - - - - Initializes a new instance of the class. - - The expected string - - - - Test whether the constraint is matched by the actual value. - This is a template method, which calls the IsMatch method - of the derived class. - - - - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - EndsWithConstraint can test whether a string ends - with an expected substring. - - - - - Initializes a new instance of the class. - - The expected string - - - - Test whether the constraint is matched by the actual value. - This is a template method, which calls the IsMatch method - of the derived class. - - - - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - RegexConstraint can test whether a string matches - the pattern provided. - - - - - Initializes a new instance of the class. - - The pattern. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - ThrowsConstraint is used to test the exception thrown by - a delegate by applying a constraint to it. - - - - - Initializes a new instance of the class, - using a constraint to be applied to the exception. - - A constraint to apply to the caught exception. - - - - Executes the code of the delegate and captures any exception. - If a non-null base constraint was provided, it applies that - constraint to the exception. - - A delegate representing the code to be tested - True if an exception is thrown and the constraint succeeds, otherwise false - - - - Converts an ActualValueDelegate to a TestDelegate - before calling the primary overload. - - - - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Returns the string representation of this constraint - - - - - Get the actual exception thrown - used by Assert.Throws. - - - - - ThrowsNothingConstraint tests that a delegate does not - throw an exception. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True if no exception is thrown, otherwise false - - - - Converts an ActualValueDelegate to a TestDelegate - before calling the primary overload. - - - - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Modes in which the tolerance value for a comparison can - be interpreted. - - - - - The tolerance was created with a value, without specifying - how the value would be used. This is used to prevent setting - the mode more than once and is generally changed to Linear - upon execution of the test. - - - - - The tolerance is used as a numeric range within which - two compared values are considered to be equal. - - - - - Interprets the tolerance as the percentage by which - the two compared values my deviate from each other. - - - - - Compares two values based in their distance in - representable numbers. - - - - - The Tolerance class generalizes the notion of a tolerance - within which an equality test succeeds. Normally, it is - used with numeric types, but it can be used with any - type that supports taking a difference between two - objects and comparing that difference to a value. - - - - - Constructs a linear tolerance of a specdified amount - - - - - Constructs a tolerance given an amount and ToleranceMode - - - - - Tests that the current Tolerance is linear with a - numeric value, throwing an exception if it is not. - - - - - Returns an empty Tolerance object, equivalent to - specifying no tolerance. In most cases, it results - in an exact match but for floats and doubles a - default tolerance may be used. - - - - - Returns a zero Tolerance object, equivalent to - specifying an exact match. - - - - - Gets the ToleranceMode for the current Tolerance - - - - - Gets the value of the current Tolerance instance. - - - - - Returns a new tolerance, using the current amount as a percentage. - - - - - Returns a new tolerance, using the current amount in Ulps. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of days. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of hours. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of minutes. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of seconds. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of milliseconds. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of clock ticks. - - - - - Returns true if the current tolerance is empty. - - - - - TypeConstraint is the abstract base for constraints - that take a Type as their expected value. - - - - - The expected Type used by the constraint - - - - - Construct a TypeConstraint for a given Type - - - - - - Write the actual value for a failing constraint test to a - MessageWriter. TypeConstraints override this method to write - the name of the type. - - The writer on which the actual value is displayed - - - - ExactTypeConstraint is used to test that an object - is of the exact type provided in the constructor - - - - - Construct an ExactTypeConstraint for a given Type - - The expected Type. - - - - Test that an object is of the exact type specified - - The actual value. - True if the tested object is of the exact type provided, otherwise false. - - - - Write the description of this constraint to a MessageWriter - - The MessageWriter to use - - - - ExceptionTypeConstraint is a special version of ExactTypeConstraint - used to provided detailed info about the exception thrown in - an error message. - - - - - Constructs an ExceptionTypeConstraint - - - - - Write the actual value for a failing constraint test to a - MessageWriter. Overriden to write additional information - in the case of an Exception. - - The MessageWriter to use - - - - InstanceOfTypeConstraint is used to test that an object - is of the same type provided or derived from it. - - - - - Construct an InstanceOfTypeConstraint for the type provided - - The expected Type - - - - Test whether an object is of the specified type or a derived type - - The object to be tested - True if the object is of the provided type or derives from it, otherwise false. - - - - Write a description of this constraint to a MessageWriter - - The MessageWriter to use - - - - AssignableFromConstraint is used to test that an object - can be assigned from a given Type. - - - - - Construct an AssignableFromConstraint for the type provided - - - - - - Test whether an object can be assigned from the specified type - - The object to be tested - True if the object can be assigned a value of the expected Type, otherwise false. - - - - Write a description of this constraint to a MessageWriter - - The MessageWriter to use - - - - AssignableToConstraint is used to test that an object - can be assigned to a given Type. - - - - - Construct an AssignableToConstraint for the type provided - - - - - - Test whether an object can be assigned to the specified type - - The object to be tested - True if the object can be assigned a value of the expected Type, otherwise false. - - - - Write a description of this constraint to a MessageWriter - - The MessageWriter to use - - - - Thrown when an assertion failed. - - - - - The error message that explains - the reason for the exception - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - Thrown when an assertion failed. - - - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - Thrown when a test executes inconclusively. - - - - - The error message that explains - the reason for the exception - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - Thrown when an assertion failed. - - - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - - - - - - - Compares two objects of a given Type for equality within a tolerance - - The first object to compare - The second object to compare - The tolerance to use in the comparison - - - - - The different targets a test action attribute can be applied to - - - - - Default target, which is determined by where the action attribute is attached - - - - - Target a individual test case - - - - - Target a suite of test cases - - - - - Delegate used by tests that execute code and - capture any thrown exception. - - - - - The Assert class contains a collection of static methods that - implement the most common assertions used in NUnit. - - - - - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Helper for Assert.AreEqual(double expected, double actual, ...) - allowing code generation to work consistently. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. - - The message to initialize the with. - - - - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. - - - - - Throws an with the message and arguments - that are passed in. This is used by the other Assert functions. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws an with the message that is - passed in. This is used by the other Assert functions. - - The message to initialize the with. - - - - Throws an . - This is used by the other Assert functions. - - - - - Throws an with the message and arguments - that are passed in. This causes the test to be reported as ignored. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws an with the message that is - passed in. This causes the test to be reported as ignored. - - The message to initialize the with. - - - - Throws an . - This causes the test to be reported as ignored. - - - - - Throws an with the message and arguments - that are passed in. This causes the test to be reported as inconclusive. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws an with the message that is - passed in. This causes the test to be reported as inconclusive. - - The message to initialize the with. - - - - Throws an . - This causes the test to be reported as Inconclusive. - - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - - - - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. - - A TestDelegate to be executed - A ThrowsConstraint used in the test - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. - - A Constraint to be applied - The actual value to test - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. - - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. - - - This method is provided for use by VB developers needing to test - the value of properties with private setters. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws a particular exception when called. - - A constraint to be satisfied by the exception - A TestSnippet delegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws a particular exception when called. - - A constraint to be satisfied by the exception - A TestSnippet delegate - The message that will be displayed on failure - - - - Verifies that a delegate throws a particular exception when called. - - A constraint to be satisfied by the exception - A TestSnippet delegate - - - - Verifies that a delegate throws a particular exception when called. - - The exception Type expected - A TestSnippet delegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws a particular exception when called. - - The exception Type expected - A TestSnippet delegate - The message that will be displayed on failure - - - - Verifies that a delegate throws a particular exception when called. - - The exception Type expected - A TestSnippet delegate - - - - Verifies that a delegate throws a particular exception when called. - - Type of the expected exception - A TestSnippet delegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws a particular exception when called. - - Type of the expected exception - A TestSnippet delegate - The message that will be displayed on failure - - - - Verifies that a delegate throws a particular exception when called. - - Type of the expected exception - A TestSnippet delegate - - - - Verifies that a delegate throws an exception when called - and returns it. - - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws an exception when called - and returns it. - - A TestDelegate - The message that will be displayed on failure - - - - Verifies that a delegate throws an exception when called - and returns it. - - A TestDelegate - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - - - - Verifies that a delegate does not throw an exception - - A TestSnippet delegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate does not throw an exception. - - A TestSnippet delegate - The message that will be displayed on failure - - - - Verifies that a delegate does not throw an exception. - - A TestSnippet delegate - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - The message to display in case of failure - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - The message to display in case of failure - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - - - - Assert that a string is empty - that is equal to string.Empty - - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that a string is empty - that is equal to string.Empty - - The string to be tested - The message to display in case of failure - - - - Assert that a string is empty - that is equal to string.Empty - - The string to be tested - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing ICollection - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing ICollection - The message to display in case of failure - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing ICollection - - - - Assert that a string is not empty - that is not equal to string.Empty - - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that a string is not empty - that is not equal to string.Empty - - The string to be tested - The message to display in case of failure - - - - Assert that a string is not empty - that is not equal to string.Empty - - The string to be tested - - - - Assert that an array, list or other collection is not empty - - An array, list or other collection implementing ICollection - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that an array, list or other collection is not empty - - An array, list or other collection implementing ICollection - The message to display in case of failure - - - - Assert that an array, list or other collection is not empty - - An array, list or other collection implementing ICollection - - - - Assert that a string is either null or equal to string.Empty - - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that a string is either null or equal to string.Empty - - The string to be tested - The message to display in case of failure - - - - Assert that a string is either null or equal to string.Empty - - The string to be tested - - - - Assert that a string is not null or empty - - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that a string is not null or empty - - The string to be tested - The message to display in case of failure - - - - Assert that a string is not null or empty - - The string to be tested - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - - - - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. - - The value that is expected - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. - - The value that is expected - The actual value - The message to display in case of failure - - - - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. - - The value that is expected - The actual value - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. - - The value that is expected - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. - - The value that is expected - The actual value - The message to display in case of failure - - - - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. - - The value that is expected - The actual value - - - - Asserts that two objects refer to the same object. If they - are not the same an is thrown. - - The expected object - The actual object - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that two objects refer to the same object. If they - are not the same an is thrown. - - The expected object - The actual object - The message to display in case of failure - - - - Asserts that two objects refer to the same object. If they - are not the same an is thrown. - - The expected object - The actual object - - - - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. - - The expected object - The actual object - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. - - The expected object - The actual object - The message to display in case of failure - - - - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. - - The expected object - The actual object - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Asserts that an object is contained in a list. - - The expected object - The list to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is contained in a list. - - The expected object - The list to be examined - The message to display in case of failure - - - - Asserts that an object is contained in a list. - - The expected object - The list to be examined - - - - Gets the number of assertions executed so far and - resets the counter to zero. - - - - - AssertionHelper is an optional base class for user tests, - allowing the use of shorter names for constraints and - asserts and avoiding conflict with the definition of - , from which it inherits much of its - behavior, in certain mock object frameworks. - - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. Works - identically to Assert.That - - A Constraint to be applied - The actual value to test - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. Works - identically to Assert.That. - - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. Works - identically to Assert.That - - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to Assert.That. - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to Assert.That. - - The evaluated condition - The message to display if the condition is false - - - - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically Assert.That. - - The evaluated condition - - - - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. - - A TestDelegate to be executed - A ThrowsConstraint used in the test - - - - Returns a ListMapper based on a collection. - - The original collection - - - - - Provides static methods to express the assumptions - that must be met for a test to give a meaningful - result. If an assumption is not met, the test - should produce an inconclusive result. - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - - - - Asserts that a condition is true. If the condition is false the - method throws an . - - The evaluated condition - - - - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. - - A TestDelegate to be executed - A ThrowsConstraint used in the test - - - - A set of Assert methods operationg on one or more collections - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Asserts that all items contained in collection are of the type specified by expectedType. - - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - - - - Asserts that all items contained in collection are of the type specified by expectedType. - - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - The message that will be displayed on failure - - - - Asserts that all items contained in collection are of the type specified by expectedType. - - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that all items contained in collection are not equal to null. - - IEnumerable containing objects to be considered - - - - Asserts that all items contained in collection are not equal to null. - - IEnumerable containing objects to be considered - The message that will be displayed on failure - - - - Asserts that all items contained in collection are not equal to null. - - IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Ensures that every object contained in collection exists within the collection - once and only once. - - IEnumerable of objects to be considered - - - - Ensures that every object contained in collection exists within the collection - once and only once. - - IEnumerable of objects to be considered - The message that will be displayed on failure - - - - Ensures that every object contained in collection exists within the collection - once and only once. - - IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - - - - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are not exactly equal. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - - - - Asserts that expected and actual are not exactly equal. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - - - - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - - - - Asserts that expected and actual are not exactly equal. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are not equivalent. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are not equivalent. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - - - - Asserts that expected and actual are not equivalent. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that collection contains actual as an item. - - IEnumerable of objects to be considered - Object to be found within collection - - - - Asserts that collection contains actual as an item. - - IEnumerable of objects to be considered - Object to be found within collection - The message that will be displayed on failure - - - - Asserts that collection contains actual as an item. - - IEnumerable of objects to be considered - Object to be found within collection - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that collection does not contain actual as an item. - - IEnumerable of objects to be considered - Object that cannot exist within collection - - - - Asserts that collection does not contain actual as an item. - - IEnumerable of objects to be considered - Object that cannot exist within collection - The message that will be displayed on failure - - - - Asserts that collection does not contain actual as an item. - - IEnumerable of objects to be considered - Object that cannot exist within collection - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that superset is not a subject of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - - - - Asserts that superset is not a subject of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - - - - Asserts that superset is not a subject of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that superset is a subset of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - - - - Asserts that superset is a subset of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - - - - Asserts that superset is a subset of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - - - - Assert that an array,list or other collection is empty - - An array, list or other collection implementing IEnumerable - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - - - - Assert that an array,list or other collection is empty - - An array, list or other collection implementing IEnumerable - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - The message to be displayed on failure - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - - - - Static helper class used in the constraint-based syntax - - - - - Creates a new SubstringConstraint - - The value of the substring - A SubstringConstraint - - - - Creates a new CollectionContainsConstraint. - - The item that should be found. - A new CollectionContainsConstraint - - - - Summary description for DirectoryAssert - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. - - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are not equal - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are equal - Arguments to be used in formatting the message - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are equal - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - The message to display if directories are not equal - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - The message to display if directories are not equal - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - The message to display if directories are not equal - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - The message to display if directories are not equal - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - - - - Summary description for FileAssert. - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. - - - - - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The expected Stream - The actual Stream - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The expected Stream - The actual Stream - The message to display if objects are not equal - - - - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The expected Stream - The actual Stream - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A file containing the value that is expected - A file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A file containing the value that is expected - A file containing the actual value - The message to display if objects are not equal - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A file containing the value that is expected - A file containing the actual value - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if objects are not equal - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - - - - Asserts that two Streams are not equal. If they are equal - an is thrown. - - The expected Stream - The actual Stream - The message to be displayed when the two Stream are the same. - Arguments to be used in formatting the message - - - - Asserts that two Streams are not equal. If they are equal - an is thrown. - - The expected Stream - The actual Stream - The message to be displayed when the Streams are the same. - - - - Asserts that two Streams are not equal. If they are equal - an is thrown. - - The expected Stream - The actual Stream - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - A file containing the value that is expected - A file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - A file containing the value that is expected - A file containing the actual value - The message to display if objects are not equal - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - A file containing the value that is expected - A file containing the actual value - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if objects are not equal - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - - - - GlobalSettings is a place for setting default values used - by the framework in performing asserts. - - - - - Default tolerance for floating point equality - - - - - Helper class with properties and methods that supply - a number of constraints used in Asserts. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. - - - - - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. - - - - - Interface implemented by a user fixture in order to - validate any expected exceptions. It is only called - for test methods marked with the ExpectedException - attribute. - - - - - Method to handle an expected exception - - The exception to be handled - - - - Helper class with properties and methods that supply - a number of constraints used in Asserts. - - - - - Returns a constraint that tests two items for equality - - - - - Returns a constraint that tests that two references are the same object - - - - - Returns a constraint that tests whether the - actual value is greater than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. - - - - - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the actual value falls - within a specified range. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a constraint that tests for null - - - - - Returns a constraint that tests for True - - - - - Returns a constraint that tests for False - - - - - Returns a constraint that tests for a positive value - - - - - Returns a constraint that tests for a negative value - - - - - Returns a constraint that tests for NaN - - - - - Returns a constraint that tests for empty - - - - - Returns a constraint that tests whether a collection - contains all unique items. - - - - - Returns a constraint that tests whether an object graph is serializable in binary format. - - - - - Returns a constraint that tests whether an object graph is serializable in xml format. - - - - - Returns a constraint that tests whether a collection is ordered - - - - - The Iz class is a synonym for Is intended for use in VB, - which regards Is as a keyword. - - - - - The List class is a helper class with properties and methods - that supply a number of constraints used with lists and collections. - - - - - List.Map returns a ListMapper, which can be used to map - the original collection to another collection. - - - - - - - ListMapper is used to transform a collection used as an actual argument - producing another collection to be used in the assertion. - - - - - Construct a ListMapper based on a collection - - The collection to be transformed - - - - Produces a collection containing all the values of a property - - The collection of property values - - - - - Randomizer returns a set of random values in a repeatable - way, to allow re-running of tests if necessary. - - - - - Get a randomizer for a particular member, returning - one that has already been created if it exists. - This ensures that the same values are generated - each time the tests are reloaded. - - - - - Get a randomizer for a particular parameter, returning - one that has already been created if it exists. - This ensures that the same values are generated - each time the tests are reloaded. - - - - - Construct a randomizer using a random seed - - - - - Construct a randomizer using a specified seed - - - - - Return an array of random doubles between 0.0 and 1.0. - - - - - - - Return an array of random doubles with values in a specified range. - - - - - Return an array of random ints with values in a specified range. - - - - - Get a random seed for use in creating a randomizer. - - - - - The SpecialValue enum is used to represent TestCase arguments - that cannot be used as arguments to an Attribute. - - - - - Null represents a null value, which cannot be used as an - argument to an attriute under .NET 1.x - - - - - Basic Asserts on strings. - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - - - - Asserts that a string is not found within another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - - - - Asserts that a string starts with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string starts with another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string starts with another string. - - The expected string - The string to be examined - - - - Asserts that a string does not start with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string does not start with another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string does not start with another string. - - The expected string - The string to be examined - - - - Asserts that a string ends with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string ends with another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string ends with another string. - - The expected string - The string to be examined - - - - Asserts that a string does not end with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string does not end with another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string does not end with another string. - - The expected string - The string to be examined - - - - Asserts that two strings are equal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that two strings are equal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - - - - Asserts that two strings are equal, without regard to case. - - The expected string - The actual string - - - - Asserts that two strings are not equal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that two strings are Notequal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - - - - Asserts that two strings are not equal, without regard to case. - - The expected string - The actual string - - - - Asserts that a string matches an expected regular expression pattern. - - The regex pattern to be matched - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string matches an expected regular expression pattern. - - The regex pattern to be matched - The actual string - The message to display in case of failure - - - - Asserts that a string matches an expected regular expression pattern. - - The regex pattern to be matched - The actual string - - - - Asserts that a string does not match an expected regular expression pattern. - - The regex pattern to be used - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string does not match an expected regular expression pattern. - - The regex pattern to be used - The actual string - The message to display in case of failure - - - - Asserts that a string does not match an expected regular expression pattern. - - The regex pattern to be used - The actual string - - - - The TestCaseData class represents a set of arguments - and other parameter info to be used for a parameterized - test case. It provides a number of instance modifiers - for use in initializing the test case. - - Note: Instance modifiers are getters that return - the same instance after modifying it's state. - - - - - The argument list to be provided to the test - - - - - The expected result to be returned - - - - - Set to true if this has an expected result - - - - - The expected exception Type - - - - - The FullName of the expected exception - - - - - The name to be used for the test - - - - - The description of the test - - - - - A dictionary of properties, used to add information - to tests without requiring the class to change. - - - - - If true, indicates that the test case is to be ignored - - - - - If true, indicates that the test case is marked explicit - - - - - The reason for ignoring a test case - - - - - Initializes a new instance of the class. - - The arguments. - - - - Initializes a new instance of the class. - - The argument. - - - - Initializes a new instance of the class. - - The first argument. - The second argument. - - - - Initializes a new instance of the class. - - The first argument. - The second argument. - The third argument. - - - - Sets the expected result for the test - - The expected result - A modified TestCaseData - - - - Sets the expected exception type for the test - - Type of the expected exception. - The modified TestCaseData instance - - - - Sets the expected exception type for the test - - FullName of the expected exception. - The modified TestCaseData instance - - - - Sets the name of the test case - - The modified TestCaseData instance - - - - Sets the description for the test case - being constructed. - - The description. - The modified TestCaseData instance. - - - - Applies a category to the test - - - - - - - Applies a named property to the test - - - - - - - - Applies a named property to the test - - - - - - - - Applies a named property to the test - - - - - - - - Ignores this TestCase. - - - - - - Ignores this TestCase, specifying the reason. - - The reason. - - - - - Marks this TestCase as Explicit - - - - - - Marks this TestCase as Explicit, specifying the reason. - - The reason. - - - - - Gets the argument list to be provided to the test - - - - - Gets the expected result - - - - - Returns true if the result has been set - - - - - Gets the expected exception Type - - - - - Gets the FullName of the expected exception - - - - - Gets the name to be used for the test - - - - - Gets the description of the test - - - - - Gets a value indicating whether this is ignored. - - true if ignored; otherwise, false. - - - - Gets a value indicating whether this is explicit. - - true if explicit; otherwise, false. - - - - Gets the ignore reason. - - The ignore reason. - - - - Gets a list of categories associated with this test. - - - - - Gets the property dictionary for this test - - - - - Provide the context information of the current test - - - - - Constructs a TestContext using the provided context dictionary - - A context dictionary - - - - Get the current test context. This is created - as needed. The user may save the context for - use within a test, but it should not be used - outside the test for which it is created. - - - - - Gets a TestAdapter representing the currently executing test in this context. - - - - - Gets a ResultAdapter representing the current result for the test - executing in this context. - - - - - Gets the directory containing the current test assembly. - - - - - Gets the directory to be used for outputing files created - by this test run. - - - - - TestAdapter adapts a Test for consumption by - the user test code. - - - - - Constructs a TestAdapter for this context - - The context dictionary - - - - The name of the test. - - - - - The FullName of the test - - - - - The properties of the test. - - - - - ResultAdapter adapts a TestResult for consumption by - the user test code. - - - - - Construct a ResultAdapter for a context - - The context holding the result - - - - The TestState of current test. This maps to the ResultState - used in nunit.core and is subject to change in the future. - - - - - The TestStatus of current test. This enum will be used - in future versions of NUnit and so is to be preferred - to the TestState value. - - - - - Provides details about a test - - - - - Creates an instance of TestDetails - - The fixture that the test is a member of, if available. - The method that implements the test, if available. - The full name of the test. - A string representing the type of test, e.g. "Test Case". - Indicates if the test represents a suite of tests. - - - - The fixture that the test is a member of, if available. - - - - - The method that implements the test, if available. - - - - - The full name of the test. - - - - - A string representing the type of test, e.g. "Test Case". - - - - - Indicates if the test represents a suite of tests. - - - - - The ResultState enum indicates the result of running a test - - - - - The result is inconclusive - - - - - The test was not runnable. - - - - - The test has been skipped. - - - - - The test has been ignored. - - - - - The test succeeded - - - - - The test failed - - - - - The test encountered an unexpected exception - - - - - The test was cancelled by the user - - - - - The TestStatus enum indicates the result of running a test - - - - - The test was inconclusive - - - - - The test has skipped - - - - - The test succeeded - - - - - The test failed - - - - - Helper class with static methods used to supply constraints - that operate on strings. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. - - - - - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - TextMessageWriter writes constraint descriptions and messages - in displayable form as a text stream. It tailors the display - of individual message components to form the standard message - format of NUnit assertion failure messages. - - - - - Prefix used for the expected value line of a message - - - - - Prefix used for the actual value line of a message - - - - - Length of a message prefix - - - - - Construct a TextMessageWriter - - - - - Construct a TextMessageWriter, specifying a user message - and optional formatting arguments. - - - - - - - Method to write single line message with optional args, usually - written to precede the general failure message, at a givel - indentation level. - - The indentation level of the message - The message to be written - Any arguments used in formatting the message - - - - Display Expected and Actual lines for a constraint. This - is called by MessageWriter's default implementation of - WriteMessageTo and provides the generic two-line display. - - The constraint that failed - - - - Display Expected and Actual lines for given values. This - method may be called by constraints that need more control over - the display of actual and expected values than is provided - by the default implementation. - - The expected value - The actual value causing the failure - - - - Display Expected and Actual lines for given values, including - a tolerance value on the expected line. - - The expected value - The actual value causing the failure - The tolerance within which the test was made - - - - Display the expected and actual string values on separate lines. - If the mismatch parameter is >=0, an additional line is displayed - line containing a caret that points to the mismatch point. - - The expected string value - The actual string value - The point at which the strings don't match or -1 - If true, case is ignored in string comparisons - If true, clip the strings to fit the max line length - - - - Writes the text for a connector. - - The connector. - - - - Writes the text for a predicate. - - The predicate. - - - - Write the text for a modifier. - - The modifier. - - - - Writes the text for an expected value. - - The expected value. - - - - Writes the text for an actual value. - - The actual value. - - - - Writes the text for a generalized value. - - The value. - - - - Writes the text for a collection value, - starting at a particular point, to a max length - - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write - - - - Write the generic 'Expected' line for a constraint - - The constraint that failed - - - - Write the generic 'Expected' line for a given value - - The expected value - - - - Write the generic 'Expected' line for a given value - and tolerance. - - The expected value - The tolerance within which the test was made - - - - Write the generic 'Actual' line for a constraint - - The constraint for which the actual value is to be written - - - - Write the generic 'Actual' line for a given value - - The actual value causing a failure - - - - Gets or sets the maximum line length for this writer - - - - - Helper class with properties and methods that supply - constraints that operate on exceptions. - - - - - Creates a constraint specifying the exact type of exception expected - - - - - Creates a constraint specifying the exact type of exception expected - - - - - Creates a constraint specifying the type of exception expected - - - - - Creates a constraint specifying the type of exception expected - - - - - Creates a constraint specifying an expected exception - - - - - Creates a constraint specifying an exception with a given InnerException - - - - - Creates a constraint specifying an expected TargetInvocationException - - - - - Creates a constraint specifying an expected TargetInvocationException - - - - - Creates a constraint specifying an expected TargetInvocationException - - - - - Creates a constraint specifying that no exception is thrown - - - - diff --git a/Tools/nunit/framework/nunit.mocks.dll b/Tools/nunit/framework/nunit.mocks.dll deleted file mode 100644 index 33479511f7a..00000000000 Binary files a/Tools/nunit/framework/nunit.mocks.dll and /dev/null differ diff --git a/Tools/nunit/framework/pnunit.framework.dll b/Tools/nunit/framework/pnunit.framework.dll deleted file mode 100644 index f8cf2790d90..00000000000 Binary files a/Tools/nunit/framework/pnunit.framework.dll and /dev/null differ diff --git a/Tools/nunit/launcher.log.conf b/Tools/nunit/launcher.log.conf deleted file mode 100644 index b5bcd9da484..00000000000 --- a/Tools/nunit/launcher.log.conf +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Tools/nunit/lib/Failure.png b/Tools/nunit/lib/Failure.png deleted file mode 100644 index 2e400b276fc..00000000000 Binary files a/Tools/nunit/lib/Failure.png and /dev/null differ diff --git a/Tools/nunit/lib/Ignored.png b/Tools/nunit/lib/Ignored.png deleted file mode 100644 index 478efbf00be..00000000000 Binary files a/Tools/nunit/lib/Ignored.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Ellipsis.gif b/Tools/nunit/lib/Images/Ellipsis.gif deleted file mode 100644 index e11f26b6ecf..00000000000 Binary files a/Tools/nunit/lib/Images/Ellipsis.gif and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Circles/Failure.jpg b/Tools/nunit/lib/Images/Tree/Circles/Failure.jpg deleted file mode 100644 index c245548b916..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Circles/Failure.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Circles/Ignored.jpg b/Tools/nunit/lib/Images/Tree/Circles/Ignored.jpg deleted file mode 100644 index 0549b70588b..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Circles/Ignored.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Circles/Inconclusive.jpg b/Tools/nunit/lib/Images/Tree/Circles/Inconclusive.jpg deleted file mode 100644 index 8d36153cdb9..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Circles/Inconclusive.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Circles/Skipped.jpg b/Tools/nunit/lib/Images/Tree/Circles/Skipped.jpg deleted file mode 100644 index 3d84255ccfe..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Circles/Skipped.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Circles/Success.jpg b/Tools/nunit/lib/Images/Tree/Circles/Success.jpg deleted file mode 100644 index 15ec1b7fbc9..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Circles/Success.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Classic/Failure.jpg b/Tools/nunit/lib/Images/Tree/Classic/Failure.jpg deleted file mode 100644 index 658905fd98d..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Classic/Failure.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Classic/Ignored.jpg b/Tools/nunit/lib/Images/Tree/Classic/Ignored.jpg deleted file mode 100644 index 95b7fdbd142..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Classic/Ignored.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Classic/Inconclusive.jpg b/Tools/nunit/lib/Images/Tree/Classic/Inconclusive.jpg deleted file mode 100644 index 32a0ff72f11..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Classic/Inconclusive.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Classic/Skipped.jpg b/Tools/nunit/lib/Images/Tree/Classic/Skipped.jpg deleted file mode 100644 index 3d84255ccfe..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Classic/Skipped.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Classic/Success.jpg b/Tools/nunit/lib/Images/Tree/Classic/Success.jpg deleted file mode 100644 index 3d8e76092fb..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Classic/Success.jpg and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Default/Failure.png b/Tools/nunit/lib/Images/Tree/Default/Failure.png deleted file mode 100644 index 2e400b276fc..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Default/Failure.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Default/Ignored.png b/Tools/nunit/lib/Images/Tree/Default/Ignored.png deleted file mode 100644 index 05715cbbc2f..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Default/Ignored.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Default/Inconclusive.png b/Tools/nunit/lib/Images/Tree/Default/Inconclusive.png deleted file mode 100644 index 4807b7cedbc..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Default/Inconclusive.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Default/Skipped.png b/Tools/nunit/lib/Images/Tree/Default/Skipped.png deleted file mode 100644 index 7c9fc64e387..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Default/Skipped.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Default/Success.png b/Tools/nunit/lib/Images/Tree/Default/Success.png deleted file mode 100644 index 2a301508c65..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Default/Success.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Visual Studio/Failure.png b/Tools/nunit/lib/Images/Tree/Visual Studio/Failure.png deleted file mode 100644 index ba03e848532..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Visual Studio/Failure.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Visual Studio/Ignored.png b/Tools/nunit/lib/Images/Tree/Visual Studio/Ignored.png deleted file mode 100644 index 9271d6e7526..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Visual Studio/Ignored.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Visual Studio/Inconclusive.png b/Tools/nunit/lib/Images/Tree/Visual Studio/Inconclusive.png deleted file mode 100644 index 76219b5c094..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Visual Studio/Inconclusive.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Visual Studio/SeriousWarning.png b/Tools/nunit/lib/Images/Tree/Visual Studio/SeriousWarning.png deleted file mode 100644 index 6a578ccaa27..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Visual Studio/SeriousWarning.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Visual Studio/Skipped.png b/Tools/nunit/lib/Images/Tree/Visual Studio/Skipped.png deleted file mode 100644 index 7c9fc64e387..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Visual Studio/Skipped.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/Tree/Visual Studio/Success.png b/Tools/nunit/lib/Images/Tree/Visual Studio/Success.png deleted file mode 100644 index 346fe8f923d..00000000000 Binary files a/Tools/nunit/lib/Images/Tree/Visual Studio/Success.png and /dev/null differ diff --git a/Tools/nunit/lib/Images/pinned.gif b/Tools/nunit/lib/Images/pinned.gif deleted file mode 100644 index cb07448dd5a..00000000000 Binary files a/Tools/nunit/lib/Images/pinned.gif and /dev/null differ diff --git a/Tools/nunit/lib/Images/unpinned.gif b/Tools/nunit/lib/Images/unpinned.gif deleted file mode 100644 index f25fbb53329..00000000000 Binary files a/Tools/nunit/lib/Images/unpinned.gif and /dev/null differ diff --git a/Tools/nunit/lib/Inconclusive.png b/Tools/nunit/lib/Inconclusive.png deleted file mode 100644 index 4807b7cedbc..00000000000 Binary files a/Tools/nunit/lib/Inconclusive.png and /dev/null differ diff --git a/Tools/nunit/lib/NSubstitute.dll b/Tools/nunit/lib/NSubstitute.dll deleted file mode 100644 index 9adbdd12403..00000000000 Binary files a/Tools/nunit/lib/NSubstitute.dll and /dev/null differ diff --git a/Tools/nunit/lib/NSubstitute.xml b/Tools/nunit/lib/NSubstitute.xml deleted file mode 100644 index 4bd55c1c2d8..00000000000 --- a/Tools/nunit/lib/NSubstitute.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - NSubstitute - - - - - Argument matchers used for specifying calls to substitutes. - - - - - Match any argument value compatible with type . - - - - - - - Match argument that is equal to . - - - - - - - - Match argument that satisfies . - If the throws an exception for an argument it will be treated as non-matching. - - - - - - - - Invoke any argument as soon as a matching call is made to the substitute. - - - - - - Invoke any argument with specified argument as soon as a matching call is made to the substitute. - - - - - - - - Invoke any argument with specified arguments as soon as a matching call is made to the substitute. - - - - - - - - - - Invoke any argument with specified arguments as soon as a matching call is made to the substitute. - - - - - - - - - - - - Invoke any argument with specified arguments as soon as a matching call is made to the substitute. - - - - - - - - - - - - - - Invoke any argument with specified arguments as soon as a matching call is made to the substitute. - - - Arguments to pass to delegate. - - - - - Capture any argument compatible with type and use it to call the function - as soon as a matching call is made to the substitute. - - - - - - - - Provides a specification for arguments for use with . - Can additionally implement to give descriptions when arguments do not match. - - - - - Checks whether the satisfies the condition of the matcher. - If this throws an exception the argument will be treated as non-matching. - - - - - - - Describes how the does not match the condition specified by this class, or - if a detailed description can not be provided for the argument. - - - Description of the non-match, or if no description can be provided. - - - - Combines two enumerables into a new enumerable using the given selector. - - - - - - - - - - This implementation was sanity-checked against the - Edulinq implementation and - Eric Lippert's implementation. - - - - - Checks if the instance can be used when a is expected. - - - - - - - - Join the using . - - - - - - - - Delegates to ThreadLocal<T>, but wraps Value property access in try/catch to swallow ObjectDisposedExceptions. - These can occur if the Value property is accessed from the finalizer thread. Because we can't detect this, we'll - just swallow the exception (the finalizer thread won't be using any of the values from thread local storage anyway). - - - - - - Provides a specification for arguments for use with . - Can additionally implement to give descriptions when arguments do not match. - - Matches arguments of type or compatible type. - - - - Checks whether the satisfies the condition of the matcher. - If this throws an exception the argument will be treated as non-matching. - - - - - - - Raise an event for an EventHandler<TEventArgs> event with the provided and . - - - - - Raise an event for an EventHandler<TEventArgs> event with the substitute as the sender and the provided . - - - - - Raise an event for an EventHandler<EventArgsT> event with the substitute as the sender - and with a default instance of . - - - - - Raise an event for an EventHandler or EventHandler<EventArgs> event with the substitute - as the sender and with empty EventArgs. - - - - - Raise an event of type with the provided arguments. If no arguments are provided - NSubstitute will try and provide reasonble defaults. - - - - - Create a substitute for one or more types. For example: Substitute.For<ISomeType>() - - - - - Substitute for an interface or class. - Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members - can be recorded or have return values specified. - - The type of interface or class to substitute. - Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors. - A substitute for the interface or class. - - - - Substitute for multiple interfaces or a class that implements an interface. At most one class can be specified. - Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members - can be recorded or have return values specified. - - The type of interface or class to substitute. - An additional interface or class (maximum of one class) the substitute should implement. - Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors. - A substitute of type T1, that also implements T2. - - - - Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified. - If additional interfaces are required use the overload. - Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members - can be recorded or have return values specified. - - The type of interface or class to substitute. - An additional interface or class (maximum of one class) the substitute should implement. - An additional interface or class (maximum of one class) the substitute should implement. - Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors. - A substitute of type T1, that also implements T2 and T3. - - - - Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified. - Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members - can be recorded or have return values specified. - - The types of interfaces or a type of class and multiple interfaces the substitute should implement. - Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors. - A substitute implementing the specified types. - - - diff --git a/Tools/nunit/lib/Rhino.Mocks.dll b/Tools/nunit/lib/Rhino.Mocks.dll deleted file mode 100644 index 3fc4b2ae437..00000000000 Binary files a/Tools/nunit/lib/Rhino.Mocks.dll and /dev/null differ diff --git a/Tools/nunit/lib/Rhino.Mocks.xml b/Tools/nunit/lib/Rhino.Mocks.xml deleted file mode 100644 index f9b8912b023..00000000000 --- a/Tools/nunit/lib/Rhino.Mocks.xml +++ /dev/null @@ -1,5413 +0,0 @@ - - - - Rhino.Mocks - - - - - Defines constraints and return values for arguments of a mock. - Only use Arg inside a method call on a mock that is recording. - Example: - ExpectCall( - mock.foo( - Arg<int>.Is.GreaterThan(2), - Arg<string>.Is.Anything - )); - Use Arg.Text for string specific constraints - Use Arg<ListClass>.List for list specific constraints - - - - - - Register the predicate as a constraint for the current call. - - The predicate. - default(T) - - Allow you to use code to create constraints - - demo.AssertWasCalled(x => x.Bar(Arg{string}.Matches(a => a.StartsWith("b") && a.Contains("ba")))); - - - - - - Define a complex constraint for this argument by passing several constraints - combined with operators. (Use Is in simple cases.) - Example: Arg<string>.Matches(Is.Equal("Hello") || Text.EndsWith("u")); - - Constraints using Is, Text and List - Dummy to satisfy the compiler - - - - Define a Ref argument. - - Constraints for this argument - value returned by the mock - - - - - Define a out parameter. Use it together with the keyword out and use the - Dummy field available by the return value. - Example: mock.foo( out Arg<string>.Out("hello").Dummy ); - - - - - - - Define a simple constraint for this argument. (Use Matches in simple cases.) - Example: - Arg<int>.Is.Anthing - Arg<string>.Is.Equal("hello") - - - - - Define Constraints on list arguments. - - - - - Use the Arg class (without generic) to define Text constraints - - - - - Evaluate an equal constraint for . - - The object the parameter should equal to - - - - Define constraints on text arguments. - - - - - Used to manage the static state of the Arg<T> class"/> - - - - - Resets the static state - - - - - Returns return values for the out and ref parameters - Note: the array returned has the size of the number of out and ref - argument definitions - - - - - - Returns the constraints for all arguments. - Out arguments have an Is.Anything constraint and are also in the list. - - - - - - What should BackToRecord clear - - - - - Retain all expectations and behaviors and return to mock - - - - - All expectations - - - - - Event subscribers for this instance - - - - - Methods that should be forwarded to the base class implementation - - - - - Properties that should behave like properties - - - - - Remove all the behavior of the object - - - - - Interface for constraints - - - - - Determines if the object pass the constraints - - - - - And operator for constraints - - - - - Not operator for constraints - - - - - Or operator for constraints - - - - - Allow overriding of || or && - - - - - - - Allow overriding of || or && - - - - - - - Gets the message for this constraint - - - - - - Constrain that the public field has a specified value - - - - - Constrain that the public field matches another constraint. - - - - - Creates a new instance. - - Name of the public field. - Constraint to place on the public field value. - - - - Creates a new instance, specifying a disambiguating - for the public field. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - Constraint to place on the public field value. - - - - Determines if the object passes the constraint. - - - - - Gets the message for this constraint - - - - - - Creates a new instance. - - Name of the public field. - Expected value. - - - - Creates a new instance, specifying a disambiguating - for the public field. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - Expected value. - - - - Constrain that the property has a specified value - - - - - Constrain that the property matches another constraint. - - - - - Creates a new instance. - - Name of the property. - Constraint to place on the property value. - - - - Creates a new instance, specifying a disambiguating - for the property. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - Constraint to place on the property value. - - - - Determines if the object passes the constraint. - - - - - Gets the message for this constraint - - - - - - Creates a new instance. - - Name of the property. - Expected value. - - - - Creates a new instance, specifying a disambiguating - for the property. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - Expected value. - - - - Constrain that the parameter must be of the specified type - - - - - Creates a new instance. - - Type. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that determines whether an object is the same object as another. - - - - - Creates a new instance. - - Obj. - - - - Determines if the object passes the constraints. - - - - - Gets the message for this constraint. - - - - - Evaluate a parameter using constraints - - - - - Create new instance - - - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - A constraint based on lambda expression, we are using Expression{T} - because we want to be able to get good error reporting on that. - - - - - Initializes a new instance of the class. - - The expr. - - - - Determines if the object pass the constraints - - - - - - - Gets the message for this constraint - - - - - - Constrain that the list contains the same items as the parameter list - - - - - Creates a new instance. - - In list. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constrain that the parameter is one of the items in the list - - - - - Creates a new instance. - - In list. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constrain that the object is inside the parameter list - - - - - Creates a new instance. - - In list. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Applies another AbstractConstraint to the collection count. - - - - - Creates a new instance. - - The constraint that should be applied to the collection count. - - - - Determines if the parameter conforms to this constraint. - - - - - Gets the message for this constraint. - - - - - Applies another AbstractConstraint to a specific list element. - - - - - Creates a new instance. - - The zero-based index of the list element. - The constraint that should be applied to the list element. - - - - Determines if the parameter conforms to this constraint. - - - - - Gets the message for this constraint - - - - - - Applies another AbstractConstraint to a specific generic keyed list element. - - - - - Creates a new instance. - - The key of the list element. - The constraint that should be applied to the list element. - - - - Determines if the parameter conforms to this constraint. - - - - - Gets the message for this constraint - - - - - - Constrains that all elements are in the parameter list - - - - - Initializes a new instance of the class. - - The these. - - - - Determines if the object pass the constraints - - - - - - - Gets the message for this constraint - - - - - - Combines two constraints, constraint pass if either is fine. - - - - - Creates a new instance. - - C1. - C2. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Negate a constraint - - - - - Creates a new instance. - - C1. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Combines two constraints - - - - - - Creates a new instance. - - C1. - C2. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constrain the argument to validate according to regex pattern - - - - - Creates a new instance. - - Pattern. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that evaluate whatever an argument contains the specified string. - - - - - Creates a new instance. - - Inner string. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that evaluate whatever an argument ends with the specified string - - - - - Creates a new instance. - - End. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that evaluate whatever an argument start with the specified string - - - - - Creates a new instance. - - Start. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that evaluate whatever an object equals another - - - - - Creates a new instance. - - Obj. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that always returns true - - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that evaluate whatever a comparable is greater than another - - - - - Creates a new instance. - - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Initializes a new constraint object. - - The expected object, The actual object is passed in as a parameter to the method - - - - Evaluate this constraint. - - The actual object that was passed in the method call to the mock. - True when the constraint is met, else false. - - - - Checks if the properties of the object - are the same as the properies of the object. - - The expected object - The actual object - True when both objects have the same values, else False. - - - - - - - - - This is the real heart of the beast. - - - - Used by CheckReferenceType to check all properties of the reference type. - - The expected object - The actual object - True when both objects have the same values, else False. - - - - Used by CheckReferenceType to check all fields of the reference type. - - The expected object - The actual object - True when both objects have the same values, else False. - - - - Checks the items of both collections - - The expected collection - - True if both collections contain the same items in the same order. - - - - Builds a propertyname from the Stack _properties like 'Order.Product.Price' - to be used in the error message. - - A nested property name. - - - - Rhino.Mocks uses this property to generate an error message. - - - A message telling the tester why the constraint failed. - - - - - Provides access to the constraintes defined in the class to be used in context - with the syntax. - - The type of the argument - - - - Evaluate a greater than constraint for . - - The object the parameter should be greater than - - - - Evaluate a less than constraint for . - - The object the parameter should be less than - - - - Evaluate a less than or equal constraint for . - - The object the parameter should be less than or equal to - - - - Evaluate a greater than or equal constraint for . - - The object the parameter should be greater than or equal to - - - - Evaluate an equal constraint for . - - The object the parameter should equal to - - - - Evaluate a not equal constraint for . - - The object the parameter should not equal to - - - - Evaluate a same as constraint. - - The object the parameter should the same as. - - - - Evaluate a not same as constraint. - - The object the parameter should not be the same as. - - - - Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. - - - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - A constraints that accept anything - - - - - - A constraint that accept only nulls - - - - - - A constraint that accept only non null values - - - - - - A constraint that accept only value of the specified type. - The check is performed on the type that has been defined - as the argument type. - - - - - Provides access to the constraints defined in the class to be used in context - with the syntax. - - - - - Determines whether the specified object is in the parameter. - The parameter must be IEnumerable. - - Obj. - - - - - Determines whatever the parameter is in the collection. - - - - - Determines that the parameter collection is identical to the specified collection - - - - - Determines that the parameter collection has the specified number of elements. - - The constraint that should be applied to the collection count. - - - - Determines that an element of the parameter collections conforms to another AbstractConstraint. - - The zero-based index of the list element. - The constraint which should be applied to the list element. - - - - Determines that all elements of the specified collection are in the the parameter collection - - The collection to compare against - The constraint which should be applied to the list parameter. - - - - Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. - - - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Provides a dummy field to pass as out or ref argument. - - - - - - Dummy field to satisfy the compiler. Used for out and ref arguments. - - - - - Central location for constraints for object's public fields - - - - - Constrains the parameter to have a public field with the specified value - - Name of the public field. - Expected value. - - - - - Constrains the parameter to have a public field with the specified value. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - Expected value. - - - - - Constrains the parameter to have a public field satisfying a specified constraint. - - Name of the public field. - Constraint for the public field. - - - - Constrains the parameter to have a public field satisfying a specified constraint. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - Constraint for the public field. - - - - Determines whether the parameter has the specified public field and that it is null. - - Name of the public field. - - - - - Determines whether the parameter has the specified public field and that it is null. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - - - - - Determines whether the parameter has the specified public field and that it is not null. - - Name of the public field. - - - - - Determines whether the parameter has the specified public field and that it is not null. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - - - - - Central location for constraints - - - - - Evaluate a greater than constraint for . - - The object the parameter should be greater than - - - - Evaluate a less than constraint for . - - The object the parameter should be less than - - - - Evaluate a less than or equal constraint for . - - The object the parameter should be less than or equal to - - - - Evaluate a greater than or equal constraint for . - - The object the parameter should be greater than or equal to - - - - Evaluate an equal constraint for . - - The object the parameter should equal to - - - - Evaluate a not equal constraint for . - - The object the parameter should not equal to - - - - Evaluate a same as constraint. - - The object the parameter should the same as. - - - - Evaluate a not same as constraint. - - The object the parameter should not be the same as. - - - - A constraints that accept anything - - - - - - A constraint that accept only nulls - - - - - - A constraint that accept only non null values - - - - - - A constraint that accept only value of the specified type - - - - - A constraint that accept only value of the specified type - - - - - Evaluate a parameter using a predicate - - The predicate to use - - - - Central location for constraints about lists and collections - - - - - Determines whether the specified obj is in the parameter. - The parameter must be IEnumerable. - - Obj. - - - - - Determines whatever the parameter is in the collection. - - - - - Determines that the parameter collection is identical to the specified collection - - - - - Determines that the parameter collection has the specified number of elements. - - The constraint that should be applied to the collection count. - - - - Determines that an element of the parameter collections conforms to another AbstractConstraint. - - The zero-based index of the list element. - The constraint which should be applied to the list element. - - - - Determines that an element of the parameter collections conforms to another AbstractConstraint. - - The key of the element. - The constraint which should be applied to the element. - - - - Determines that all elements of the specified collection are in the the parameter collection - - The collection to compare against - The constraint which should be applied to the list parameter. - - - - Central location for constraints for object's properties - - - - - Constrains the parameter to have property with the specified value - - Name of the property. - Expected value. - - - - - Constrains the parameter to have property with the specified value. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - Expected value. - - - - - Constrains the parameter to have a property satisfying a specified constraint. - - Name of the property. - Constraint for the property. - - - - Constrains the parameter to have a property satisfying a specified constraint. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - Constraint for the property. - - - - Determines whether the parameter has the specified property and that it is null. - - Name of the property. - - - - - Determines whether the parameter has the specified property and that it is null. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - - - - - Determines whether the parameter has the specified property and that it is not null. - - Name of the property. - - - - - Determines whether the parameter has the specified property and that it is not null. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - - - - - constraints the parameter to have the exact same property values as the expected object. - - An object, of the same type as the parameter, whose properties are set with the expected values. - An instance of the constraint that will do the actual check. - - The parameter's public property values and public field values will be matched against the expected object's - public property values and public field values. The first mismatch will be reported and no further matching is done. - The matching is recursive for any property or field that has properties or fields of it's own. - Collections are supported through IEnumerable, which means the constraint will check if the actual and expected - collection contain the same values in the same order, where the values contained by the collection can have properties - and fields of their own that will be checked as well because of the recursive nature of this constraint. - - - - - Central location for all text related constraints - - - - - Constrain the argument to starts with the specified string - - - - - Constrain the argument to end with the specified string - - - - - Constrain the argument to contain the specified string - - - - - Constrain the argument to validate according to regex pattern - - - - - Provides access to the constraintes defined in the class to be used in context - with the syntax. - - - - - Constrain the argument to starts with the specified string - - - - - - Constrain the argument to end with the specified string - - - - - Constrain the argument to contain the specified string - - - - - Constrain the argument to validate according to regex pattern - - - - - Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. - - - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - This class defines a lot of method signatures, which we will use - to allow compatability on net-2.0 - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - Allows expectations to be set on methods that should never be called. - For methods with void return value, you need to use LastCall or - DoNotExpect.Call() with a delegate. - - - - - Sets LastCall.Repeat.Never() on /any/ proxy on /any/ repository on the current thread. - This method if not safe for multi threading scenarios. - - - - - Accepts a delegate that will execute inside the method which - LastCall.Repeat.Never() will be applied to. - It is expected to be used with anonymous delegates / lambda expressions and only one - method should be called. - - - IService mockSrv = mocks.CreateMock(typeof(IService)) as IService; - DoNotExpect.Call(delegate{ mockSrv.Stop(); }); - ... - - - - - An expectaton violation was detected. - - - - - Creates a new instance. - - Message. - - - - Serialization constructor - - - - - Signals that an object was call on a mock repository which doesn't - belong to this mock repository or not a mock - - - - - Creates a new instance. - - Message. - - - - Serialization constructor - - - - - Allows to set expectation on methods that has return values. - For methods with void return value, you need to use LastCall - - - - - The method options for the last call on /any/ proxy on /any/ repository on the current thread. - This method if not safe for multi threading scenarios, use . - - - - - Accepts a delegate that will execute inside the method, and then return the resulting - instance. - It is expected to be used with anonymous delegates / lambda expressions and only one - method should be called. - - - IService mockSrv = mocks.CreateMock(typeof(IService)) as IService; - Expect.Call(delegate{ mockSrv.Start(); }).Throw(new NetworkException()); - ... - - - - - Get the method options for the last method call on the mockInstance. - - - - - A delegate that can be used to get better syntax on Expect.Call(delegate { foo.DoSomething(); }); - - - - - Abstract class that holds common information for - expectations. - - - - - Interface to validate that a method call is correct. - - - - - Validate the arguments for the method. - This method can be called numerous times, so be careful about side effects - - The arguments with which the method was called - - - - Add an actual method call to this expectation - - - - - Returns the return value or throw the exception and setup any output / ref parameters - that has been set. - - - - - Builds the verification failure message. - - - - - - Gets the error message. - - - - - - Range of expected calls - - - - - Number of call actually made for this method - - - - - If this expectation is still waiting for calls. - - - - - The return value for a method matching this expectation - - - - - Gets or sets the exception to throw on a method matching this expectation. - - - - - Gets a value indicating whether this instance's action is staisfied. - A staisfied instance means that there are no more requirements from - this method. A method with non void return value must register either - a return value or an exception to throw. - - - - - Gets the method this expectation is for. - - - - - Gets or sets what special condtions there are for this method - repeating. - - - - - Gets a value indicating whether this expectation was satisfied - - - - - Specify whatever this expectation has a return value set - You can't check ReturnValue for this because a valid return value include null. - - - - - An action to execute when the method is matched. - - - - - Set the out / ref parameters for the method call. - The indexing is zero based and ignores any non out/ref parameter. - It is possible not to pass all the parameters. This method can be called only once. - - - - - Documentation Message - - - - - Gets the invocation for this expectation - - The invocation. - - - - Occurs when the exceptation is match on a method call - - - - - Allow to set the return value in the future, if it was already set. - - - - - Number of actuall calls made that passed this expectation - - - - - Range of expected calls that should pass this expectation. - - - - - The return value for a method matching this expectation - - - - - The exception to throw on a method matching this expectation. - - - - - The method this expectation is for. - - - - - The return value for this method was set - - - - - Whether this method will repeat - unlimited number of times. - - - - - A delegate that will be run when the - expectation is matched. - - - - - The arguments that matched this expectation. - - - - - Documentation message - - - - - The method originalInvocation - - - - - Get the hash code - - - - - Add an actual actualMethodCall call to this expectation - - - - - Builds the verification failure message. - - - - - - Returns the return value or throw the exception and setup output / ref parameters - - - - - Validate the arguments for the method on the child methods - - The arguments with which the method was called - - - - Creates a new instance. - - The originalInvocation for this method, required because it contains the generic type infromation - Number of method calls for this expectations - - - - Creates a new instance. - - Expectation. - - - - Validate the arguments for the method on the child methods - - The arguments with which the method was called - - - - Determines if this object equal to obj - - - - - The error message for these arguments - - - - - Asserts that the delegate has the same parameters as the expectation's method call - - - - - Setter for the outpur / ref parameters for this expecataion. - Can only be set once. - - - - - Specify whether this expectation has a return value set - You can't check ReturnValue for this because a valid return value include null. - - - - - Gets the method this expectation is for. - - - - - Gets the originalInvocation for this expectation - - The originalInvocation. - - - - Gets or sets what special condtions there are for this method - - - - - Range of expected calls - - - - - Number of call actually made for this method - - - - - If this expectation is still waiting for calls. - - - - - Gets a value indicating whether this expectation was satisfied - - - - - The return value for a method matching this expectation - - - - - An action to execute when the method is matched. - - - - - Gets or sets the exception to throw on a method matching this expectation. - - - - - Gets a value indicating whether this instance's action is staisfied. - A staisfied instance means that there are no more requirements from - this method. A method with non void return value must register either - a return value or an exception to throw or an action to execute. - - - - - Documentation message - - - - - Occurs when the exceptation is match on a method call - - - - - Allow to set the return value in the future, if it was already set. - - - - - Gets the error message. - - - - - - Expectation that matches any arguments for the method. - - - - - Creates a new instance. - - Invocation for this expectation - Number of method calls for this expectations - - - - Creates a new instance. - - Expectation. - - - - Validate the arguments for the method. - - The arguments with which the method was called - - - - Determines if the object equal to expectation - - - - - Get the hash code - - - - - Gets the error message. - - - - - - Summary description for ArgsEqualExpectation. - - - - - Creates a new instance. - - Expected args. - The invocation for this expectation - Number of method calls for this expectations - - - - Validate the arguments for the method. - - The arguments with which the method was called - - - - Determines if the object equal to expectation - - - - - Get the hash code - - - - - Gets the error message. - - - - - - Get the expected args. - - - - - Call a specified callback to verify the expectation - - - - - Creates a new instance. - - Expectation. - Callback. - - - - Creates a new instance. - - Invocation for this expectation - Callback. - Number of method calls for this expectations - - - - Validate the arguments for the method on the child methods - - The arguments with which the method was called - - - - Determines if the object equal to expectation - - - - - Get the hash code - - - - - Gets the error message. - - - - - - Expect the method's arguments to match the contraints - - - - - Creates a new instance. - - Invocation for this expectation - Constraints. - Number of method calls for this expectations - - - - Creates a new instance. - - Expectation. - Constraints. - - - - Validate the arguments for the method. - - The arguments with which the method was called - - - - Determines if the object equal to expectation - - - - - Get the hash code - - - - - Gets the error message. - - - - - - Doesn't log anything, just makes happy noises - - - - - Log expectations - allows to see what is going on inside Rhino Mocks - - - - - Logs the expectation as is was recorded - - The invocation. - The expectation. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the unexpected method call. - - The invocation. - The message. - - - - Logs the expectation as is was recorded - - The invocation. - The expectation. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the unexpected method call. - - The invocation. - The message. - - - - Operation on a remoting proxy - - - It is not possible to directly communicate to a real proxy via transparent proxy. - Transparent proxy impersonates a user type and only methods of that user type are callable. - The only methods that are guaranteed to exist on any transparent proxy are methods defined - in Object: namely ToString(), GetHashCode(), and Equals()). - - These three methods are the only way to tell the real proxy to do something. - Equals() is the most suitable of all, since it accepts an arbitrary object parameter. - The RemotingProxy code is built so that if it is compared to an IRemotingProxyOperation, - transparentProxy.Equals(operation) will call operation.Process(realProxy). - This way we can retrieve a real proxy from transparent proxy and perform - arbitrary operation on it. - - - - - Generates remoting proxies and provides utility functions - - - - - Create the proxy using remoting - - - - - Check whether an object is a transparent proxy with a RemotingProxy behind it - - Object to check - true if the object is a transparent proxy with a RemotingProxy instance behind it, false otherwise - We use Equals() method to communicate with the real proxy behind the object. - See IRemotingProxyOperation for more details - - - - Retrieve a mocked object from a transparent proxy - - Transparent proxy with a RemotingProxy instance behind it - Mocked object associated with the proxy - We use Equals() method to communicate with the real proxy behind the object. - See IRemotingProxyOperation for more details - - - - Implementation of IInvocation based on remoting proxy - - Some methods are marked NotSupported since they either don't make sense - for remoting proxies, or they are never called by Rhino Mocks - - - - Rudimetry implementation that simply logs methods calls as text. - - - - - Initializes a new instance of the class. - - The writer. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the unexpected method call. - - The invocation. - The message. - - - - Behave like a stub, all properties and events acts normally, methods calls - return default values by default (but can use expectations to set them up), etc. - - - - - Records all the expectations for a mock - - - - - Different actions on this mock - - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Verify that this mock expectations have passed. - - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Gets a mock state that match the original mock state of the object. - - - - - Get the options for the last method call - - - - - Set the exception to throw when Verify is called. - This is used to report exception that may have happened but where caught in the code. - This way, they are reported anyway when Verify() is called. - - - - - This method is called to indicate that a property behavior call. - This is done so we generate good error message in the common case of people using - Stubbed properties with Return(). - - - - - Gets the matching verify state for this state - - - - - Get the options for the last method call - - - - - Get the options for the last method call - - - - - Set the exception to throw when Verify is called. - This is used to report exception that may have happened but where caught in the code. - This way, they are reported anyway when Verify() is called. - - - - - This method is called to indicate that a property behavior call. - This is done so we generate good error message in the common case of people using - Stubbed properties with Return(). - - - - - Creates a new instance. - - Repository. - The proxy that generates the method calls - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Verify that this mock expectations have passed. - - - - - Gets a mock state that match the original mock state of the object. - - - - - Asserts the previous method is closed (had an expectation set on it so we can replay it correctly) - - - - - Get the default call count range expectation - - - - - - Gets the last expectation. - - - - - Gets the total method calls count. - - - - - Get the options for the last method call - - - - - Gets the matching verify state for this state - - - - - Initializes a new instance of the class. - - The proxy that generates the method calls - Repository. - - - - We don't care much about expectations here, so we will remove the expectation if - it is not closed. - - - - - Verify that we can move to replay state and move - to the reply state. - - - - - - Get the default call count range expectation - - - - - - Validate expectations on recorded methods, but in general completely ignoring them. - Similar to except that it would return a - when BackToRecord is called. - - - - - Validate all expectations on a mock - - - - - The repository for this state - - - - - The proxy object for this state - - - - - Get the options for the last method call - - - - - Creates a new instance. - - The previous state for this method - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Add a method call for this state' mock. - This allows derived method to cleanly get a the setupresult behavior while adding - their own. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Set the exception to throw when Verify is called. - This is used to report exception that may have happened but where caught in the code. - This way, they are reported anyway when Verify() is called. - - - - - not relevant - - - - - Verify that this mock expectations have passed. - - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Gets a mock state that match the original mock state of the object. - - - - - Get the options for the last method call - - - - - Gets the matching verify state for this state - - - - - Initializes a new instance of the class. - - The previous state for this method - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Gets a mock state that matches the original mock state of the object. - - - - - Write rhino mocks log info to the trace - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - if set to true [log recorded]. - if set to true [log replayed]. - if set to true [log unexpected]. - - - - Logs the expectation as is was recorded - - The invocation. - The expectation. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the unexpected method call. - - The invocation. - The message. - - - - Writes log information as stack traces about rhino mocks activity - - - - - Allows to redirect output to a different location. - - - - - Logs the expectation as is was recorded - - The invocation. - The expectation. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the unexpected method call. - - The invocation. - The message. - - - - Marker interface used to indicate that this is a partial mock. - - - - - Options for CallOriginalMethod - - - - - No expectation is created, the method will be called directly - - - - - Normal expectation is created, but when the method is later called, it will also call the original method - - - - - This is a data structure that is used by - to pass - the current method to the relevant delegate - - - - - Initializes a new instance of the class. - - The invocation. - - - - Gets the args for this method invocation - - - - - Get the method that was caused this invocation - - - - - Gets or sets the return value for this method invocation - - The return value. - - - - Adds optional new usage: - using(mockRepository.Record()) { - Expect.Call(mock.Method()).Return(retVal); - } - using(mockRepository.Playback()) { - // Execute code - } - N.B. mockRepository.ReplayAll() and mockRepository.VerifyAll() - calls are taken care of by Record/Playback - - - Creates proxied instances of types. - - - - Generates a stub without needing a - Arguments for 's constructor - The of stub to create. - The stub - - - - Generates a stub without needing a - The of stub. - Arguments for the 's constructor. - The stub - - - - Generate a mock object without needing a - type of mock object to create. - Arguments for 's constructor - the mock object - - - - Generate a multi-mock object without needing a - The typeof object to generate a mock for. - A second interface to generate a multi-mock for. - Arguments for 's constructor - the multi-mock object - - - - Generate a multi-mock object without without needing a - The typeof object to generate a mock for. - An interface to generate a multi-mock for. - A second interface to generate a multi-mock for. - Arguments for 's constructor - the multi-mock object - - - - Creates a multi-mock without without needing a - The type of mock to create, this can be a class - Any extra interfaces to add to the multi-mock, these can only be interfaces. - Arguments for 's constructor - the multi-mock object - - - - Creates a strict mock without without needing a - Any arguments required for the 's constructor - The type of mock object to create. - The mock object with strict replay semantics - - - - Creates a strict multi-mock without needing a - Any arguments required for the 's constructor - The type of mock object to create, this can be a class. - An interface to generate a multi-mock for, this must be an interface! - The multi-mock object with strict replay semantics - - - - Creates a strict multi-mock without needing a - Any arguments required for the 's constructor - The type of mock object to create, this can be a class. - An interface to generate a multi-mock for, this must be an interface! - A second interface to generate a multi-mock for, this must be an interface! - The multi-mock object with strict replay semantics - - - - Creates a strict multi-mock without needing a - The type of mock object to create, this can be a class - Any extra interfaces to generate a multi-mock for, these must be interaces! - Any arguments for the 's constructor - The strict multi-mock object - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Generate a mock object with dynamic replay semantics and remoting without needing the mock repository - - - - - Generate a mock object with strict replay semantics and remoting without needing the mock repository - - - - Helper method to create a mock object without a repository instance and put the object back into replay mode. - The type of mock object to create - A delegate that uses a mock repository instance to create the underlying mock - The mock object in the replay mode. - - - - - - - - - - - - - - This is a map of types to ProxyGenerators. - - - - - This is used to record the last repository that has a method called on it. - - - - - this is used to get to the last proxy on this repository. - - - - - For mock delegates, maps the proxy instance from intercepted invocations - back to the delegate that was originally returned to client code, if any. - - - - - All the proxies in the mock repositories - - - - - This is here because we can't put it in any of the recorders, since repeatable methods - have no orderring, and if we try to handle them using the usual manner, we would get into - wierd situations where repeatable method that was defined in an orderring block doesn't - exists until we enter this block. - - - - - Creates a new instance. - - - - - Move the repository to ordered mode - - - - - Move the repository to un-ordered mode - - - - - Creates a mock for the specified type. - - Type. - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a strict mock for the specified type. - - Type. - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a remoting mock for the specified type. - - Type. - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a strict remoting mock for the specified type. - - Type. - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a remoting mock for the specified type. - - - Arguments for the class' constructor, if mocking a concrete class - - - - - Creates a strict remoting mock for the specified type. - - - Arguments for the class' constructor, if mocking a concrete class - - - - - Creates a mock from several types, with strict semantics. - Only may be a class. - - - - - Creates a strict mock from several types, with strict semantics. - Only may be a class. - - - - - Creates a mock from several types, with strict semantics. - Only may be a class. - - The main type to mock. - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class. - - - - Creates a strict mock from several types, with strict semantics. - Only may be a class. - - The main type to mock. - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class. - - - - Creates a mock from several types, with dynamic semantics. - Only may be a class. - - The main type to mock. - Extra interface types to mock. - - - - Creates a mock from several types, with dynamic semantics. - Only may be a class. - - The main type to mock. - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class. - - - Creates a dynamic mock for the specified type. - Type. - Arguments for the class' constructor, if mocking a concrete class - - - Creates a dynamic mock for the specified type. - Type. - Arguments for the class' constructor, if mocking a concrete class - - - Creates a dynamic mock for the specified type. - - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a mock object that defaults to calling the class methods if no expectation is set on the method. - Type. - Arguments for the class' constructor. - - - Creates a mock object that defaults to calling the class methods. - Type. - Extra interface types to mock. - - - Creates a mock object that defaults to calling the class methods. - Type. - Extra interface types to mock. - Arguments for the class' constructor. - - - Creates a mock object using remoting proxies - Type to mock - must be MarshalByRefObject - Mock object - Proxy mock can mock non-virtual methods, but not static methods - Creates the mock state for this proxy - - - - Cause the mock state to change to replay, any further call is compared to the - ones that were called in the record state. - - This method *cannot* be called from inside an ordering. - the object to move to replay state - - - - Cause the mock state to change to replay, any further call is compared to the - ones that were called in the record state. - - the object to move to replay state - - - - Move the mocked object back to record state.You can (and it's recommended) to run {Verify()} before you use this method. - Will delete all current expectations! - - - - Move the mocked object back to record state. - Optionally, can delete all current expectations, but allows more granularity about how - it would behave with regard to the object state. - - - - - Verify that all the expectations for this object were fulfilled. - - the object to verify the expectations for - - - - Get the method options for the last call on - mockedInstance. - - The mock object - Method options for the last call - - - - Maps an invocation proxy back to the mock object instance that was originally - returned to client code which might have been a delegate to this proxy. - - The mock object proxy from the intercepted invocation - The mock object - - - This is provided to allow advance extention functionality, where Rhino Mocks standard functionality is not enough. - The type to mock - Delegate that create the first state of the mocked object (usualy the record state). - Additional types to be implemented, this can be only interfaces - optional arguments for the constructor - - - - - Method: GetMockedObject - Get an IProxy from a mocked object instance, or throws if the - object is not a mock object. - - - - - Method: GetMockedObjectOrNull - Get an IProxy from a mocked object instance, or null if the - object is not a mock object. - - - - Pops the recorder. - - - Pushes the recorder. - New recorder. - - - - All the mock objects in this repository will be moved - to record state. - - - - - All the mock objects in this repository will be moved - to record state. - - - - - Replay all the mocks from this repository - - - - - Verify all the mocks from this repository - - - - - Gets the proxy generator for a specific type. Having a single ProxyGenerator - with multiple types linearly degrades the performance so this implementation - keeps one ProxyGenerator per type. - - - - Set the exception to be thrown when verified is called. - - - - Creates a mock for the spesified type with strict mocking semantics. - Strict semantics means that any call that wasn't explicitly recorded is considered an error and would cause an exception to be thrown. - - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a mock for the spesified type with strict mocking semantics. - Strict semantics means that any call that wasn't explicitly recorded is considered an error and would cause an exception to be thrown. - - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a dynamic mock for the specified type. - - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a mock object from several types. - - - - - Creates a strict mock object from several types. - - - - - Create a mock object from several types with dynamic semantics. - - - - - Create a mock object from several types with partial semantics. - - - - - Create a mock object from several types with strict semantics. - - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class - - - - Create a strict mock object from several types with strict semantics. - - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class - - - - Create a mock object from several types with dynamic semantics. - - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class - - - - Create a mock object from several types with partial semantics. - - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class - - - - Create a mock object with from a class that defaults to calling the class methods - - Arguments for the class' constructor, if mocking a concrete class - - - - Create a stub object, one that has properties and events ready for use, and - can have methods called on it. It requires an explicit step in order to create - an expectation for a stub. - - The arguments for constructor. - - - - Create a stub object, one that has properties and events ready for use, and - can have methods called on it. It requires an explicit step in order to create - an expectation for a stub. - - The type. - The arguments for constructor. - The stub - - - - Returns true if the passed mock is currently in replay mode. - - The mock to test. - True if the mock is in replay mode, false otherwise. - - - - Determines whether the specified proxy is a stub. - - The proxy. - - - - Register a call on a prperty behavior - - - - - - Gets the recorder. - - - - - - Gets the replayer for this repository. - - - - - - Gets the last proxy which had a method call. - - - - - Delegate: CreateMockState - This is used internally to cleanly handle the creation of different - RecordMockStates. - - - - - A set of extension methods that adds Arrange Act Assert mode to Rhino Mocks - - - - - Create an expectation on this mock for this action to occur - - - The mock. - The action. - - - - - Reset all expectations on this mock object - - - The mock. - - - - Reset the selected expectation on this mock object - - - The mock. - The options to reset the expectations on this mock. - - - - Cause the mock state to change to replay, any further call is compared to the - ones that were called in the record state. - - the mocked object to move to replay state - - - - Gets the mock repository for this specificied mock object - - - The mock. - - - - - Create an expectation on this mock for this action to occur - - - - The mock. - The action. - - - - - Tell the mock object to perform a certain action when a matching - method is called. - Does not create an expectation for this method. - - - The mock. - The action. - - - - - Tell the mock object to perform a certain action when a matching - method is called. - Does not create an expectation for this method. - - - - The mock. - The action. - - - - - Gets the arguments for calls made on this mock object and the method that was called - in the action. - - - The mock. - The action. - - - Here we will get all the arguments for all the calls made to DoSomething(int) - - var argsForCalls = foo54.GetArgumentsForCallsMadeOn(x => x.DoSomething(0)) - - - - - - Gets the arguments for calls made on this mock object and the method that was called - in the action and matches the given constraints - - - The mock. - The action. - The setup constraints. - - - Here we will get all the arguments for all the calls made to DoSomething(int) - - var argsForCalls = foo54.GetArgumentsForCallsMadeOn(x => x.DoSomething(0)) - - - - - - Asserts that a particular method was called on this mock object - - - The mock. - The action. - - - - Asserts that a particular method was called on this mock object that match - a particular constraint set. - - - The mock. - The action. - The setup constraints. - - - - Asserts that a particular method was called on this mock object that match - a particular constraint set. - - - The mock. - The action. - - - - Asserts that a particular method was called on this mock object that match - a particular constraint set. - - - The mock. - The action. - The setup constraints. - - - - Asserts that a particular method was NOT called on this mock object - - - The mock. - The action. - - - - Asserts that a particular method was NOT called on this mock object that match - a particular constraint set. - - - The mock. - The action. - The setup constraints. - - - - Asserts that a particular method was NOT called on this mock object - - - The mock. - The action. - - - - Asserts that a particular method was NOT called on this mock object - - - The mock. - The action. - The setup constraints. - - - - Finds the approprite implementation type of this item. - This is the class or an interface outside of the rhino mocks. - - The mocked obj. - - - - - Verifies all expectations on this mock object - - The mock object. - - - - Gets the event raiser for the event that was called in the action passed - - The type of the event source. - The mock object. - The event subscription. - - - - - Raise the specified event using the passed arguments. - The even is extracted from the passed labmda - - The type of the event source. - The mock object. - The event subscription. - The sender. - The instance containing the event data. - - - - Raise the specified event using the passed arguments. - The even is extracted from the passed labmda - - The type of the event source. - The mock object. - The event subscription. - The args. - - - TODO: Make this better! It currently breaks down when mocking classes or - ABC's that call other virtual methods which are getting intercepted too. I wish - we could just walk Expression{Action{Action{T}} to assert only a single - method is being made. - - The workaround is to not call foo.AssertWasCalled .. rather foo.VerifyAllExpectations() - The type of mock object - The mock repository - The actual mock object to assert expectations on. - - - - Fake type that disallow creating it. - Should have been System.Type, but we can't use it. - - - - - Utility class for dealing with messing generics scenarios. - - - - - There are issues with trying to get this to work correctly with open generic types, since this is an edge case, - I am letting the runtime handle it. - - - - - Gets the real type, including de-constructing and constructing the type of generic - methods parameters. - - The type. - The invocation. - - - - - Because we need to support complex types here (simple generics were handled above) we - need to be aware of the following scenarios: - List[T] and List[Foo[T]] - - - - - ExpectationsList - - - - - Dictionary - - - - - Dictionary class - - - - - Create a new instance of ProxyStateDictionary - - - - - Allows to call a method and immediately get it's options. - - - - - Interface to allow calling a method and immediately get it's options. - - - - - Get the method options for the call - - The method call should go here, the return value is ignored - - - - Creates a new instance. - - - - - Get the method options for the call - - The method call should go here, the return value is ignored - - - - Allows to call a method and immediately get it's options. - Set the expected number for the call to Any() - - - - - Creates a new instance. - - Proxy. - Mocked instance. - - - - Get the method options for the call - - The method call should go here, the return value is ignored - - - - This class is reponsible for taking a delegate and creating a wrapper - interface around it, so it can be mocked. - - - - - The scope for all the delegate interfaces create by this mock repository. - - - - - Gets a type with an "Invoke" method suitable for use as a target of the - specified delegate type. - - - - - - - Raise events for all subscribers for an event - - - - - Raise events for all subscribers for an event - - - - - Raise the event - - - - - The most common form for the event handler signature - - - - - Create an event raiser for the specified event on this instance. - - - - - Creates a new instance of EventRaiser - - - - - Raise the event - - - - - The most common signature for events - Here to allow intellisense to make better guesses about how - it should suggest parameters. - - - - - Allows to define what would happen when a method - is called. - - - - - Allows to define what would happen when a method - is called. - - - - - Set the return value for the method. - - The object the method will return - IRepeat that defines how many times the method will return this value - - - - Allow to override this return value in the future - - IRepeat that defines how many times the method will return this value - - - - Throws the specified exception when the method is called. - - Exception to throw - - - - Ignores the arguments for this method. Any argument will be matched - againt this method. - - - - - Add constraints for the method's arguments. - - - - - Set a callback method for the last call - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched - and allow to optionally modify the invocation as needed - - - - - Call the original method on the class, bypassing the mocking layers. - - - - - - Call the original method on the class, optionally bypassing the mocking layers. - - - - - - Use the property as a simple property, getting/setting the values without - causing mock expectations. - - - - - Expect last (property) call as property setting, ignore the argument given - - - - - - Expect last (property) call as property setting with a given argument. - - - - - - - Get an event raiser for the last subscribed event. - - - - - Set the parameter values for out and ref parameters. - This is done using zero based indexing, and _ignoring_ any non out/ref parameter. - - - - - Documentation message for the expectation - - Message - - - - Better syntax to define repeats. - - - - - Allows to specify the number of time for method calls - - - - - Repeat the method twice. - - - - - Repeat the method once. - - - - - Repeat the method at least once, then repeat as many time as it would like. - - - - - Repeat the method any number of times. - This has special affects in that this method would now ignore orderring. - - - - - Set the range to repeat an action. - - Min. - Max. - - - - Set the amount of times to repeat an action. - - - - - This method must not appear in the replay state. - This has special affects in that this method would now ignore orderring. - - - - - Creates a new instance. - - the repository for this expectation - the recorder for this proxy - the proxy for this expectation - Expectation. - - - - Add constraints for the method's arguments. - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set the return value for the method. - - The object the method will return - IRepeat that defines how many times the method will return this value - - - - Set the return value for the method, but allow to override this return value in the future - - IRepeat that defines how many times the method will return this value - - - - Throws the specified exception when the method is called. - - Exception to throw - - - - Ignores the arguments for this method. Any argument will be matched - againt this method. - - - - - Call the original method on the class, bypassing the mocking layers. - - - - - - Call the original method on the class, optionally bypassing the mocking layers - - - - - - Use the property as a simple property, getting/setting the values without - causing mock expectations. - - - - - Expect last (property) call as property setting, ignore the argument given - - - - - - Expect last (property) call as property setting with a given argument. - - - - - - - Gets the event raiser for the last event - - - - - Set the parameter values for out and ref parameters. - This is done using zero based indexing, and _ignoring_ any non out/ref parameter. - - - - - Repeat the method twice. - - - - - Repeat the method once. - - - - - Repeat the method at least once, then repeat as many time as it would like. - - - - - This method must not appear in the replay state. - - - - - Documentation message for the expectation - - Message - - - - Repeat the method any number of times. - - - - - Set the range to repeat an action. - - Min. - Max. - - - - Set the amount of times to repeat an action. - - - - - Better syntax to define repeats. - - - - - This class will provide hash code for hashtables without needing - to call the GetHashCode() on the object, which may very well be mocked. - This class has no state so it is a singelton to avoid creating a lot of objects - that does the exact same thing. See flyweight patterns. - - - - - Get the hash code for a proxy object without calling GetHashCode() - on the object. - - - - - Compares two instances of mocked objects - - - - - Compare two mocked objects - - - - - The next hash code value for a mock object. - This is safe for multi threading. - - - - - The sole instance of - - - - - This is a dummy type that is used merely to give DynamicProxy the proxy instance that - it needs to create IProxy's types. - - - - - Interface to find the repository of a mocked object - - - - - Return true if it should call the original method on the object - instead of pass it to the message chain. - - The method to call - - - - Register a method to be called on the object directly - - - - - Register a property on the object that will behave as a simple property - - - - - Check if the method was registered as a property method. - - - - - Do get/set on the property, according to need. - - - - - Do add/remove on the event - - - - - Get the subscribers of a spesific event - - - - - Gets the declaring type of the method, taking into acccount the possible generic - parameters that it was created with. - - - - - Clears the state of the object, remove original calls, property behavior, subscribed events, etc. - - - - - Get all the method calls arguments that were made against this object with the specificed - method. - - - Only method calls in replay mode are counted - - - - - Records the method call - - - - - Mocks that are tied to this mock lifestyle - - - - - The unique hash code of this mock, which is not related - to the value of the GetHashCode() call on the object. - - - - - Gets the repository. - - - - - Gets the implemented types by this mocked object - - The implemented. - - - - Gets or sets the constructor arguments. - - The constructor arguments. - - - - The mocked instance that this is representing - - - - - Create a new instance of - - - - - Return true if it should call the original method on the object - instead of pass it to the message chain. - - The method to call - - - - Register a method to be called on the object directly - - - - - Register a property on the object that will behave as a simple property - Return true if there is already a value for the property - - - - - Check if the method was registered as a property method. - - - - - Do get/set on the property, according to need. - - - - - Do add/remove on the event - - - - - Get the subscribers of a spesific event - - - - - Gets the declaring type of the method, taking into acccount the possible generic - parameters that it was created with. - - - - - Get all the method calls arguments that were made against this object with the specificed - method. - - - - - Only method calls in replay mode are counted - - - - - Records the method call - - - - - - - Clears the state of the object, remove original calls, property behavior, subscribed events, etc. - - - - - Mocks that are tied to this mock lifestyle - - - - - The unique hash code of this proxy, which is not related - to the value of the GetHashCode() call on the object. - - - - - Gets the repository. - - - - - Gets or sets the constructor arguments. - - The constructor arguments. - - - - The mocked instance that this is representing - - - - - Gets the implemented types by this mocked object - - The implemented. - - - - Range for expected method calls - - - - - Creates a new instance. - - Min. - Max. - - - - Return the string representation of this range. - - - - - Gets or sets the min. - - - - - - Gets or sets the max. - - - - - - Records all the expectations for a mock and - return a ReplayDynamicMockState when Replay() - is called. - - - - - Creates a new instance. - - Repository. - The proxy that generates the method calls - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Get the default call count range expectation - - - - - - Gets a mock state that match the original mock state of the object. - - - - - Records all the expectations for a mock and - return a ReplayPartialMockState when Replay() - is called. - - - - - Creates a new instance. - - Repository. - The proxy that generates the method calls - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Gets a mock state that matches the original mock state of the object. - - - - - Options for special repeat option - - - - - This method can be called only as many times as the IMethodOptions.Expect allows. - - - - - This method should never be called - - - - - This method can be call any number of times - - - - - This method will call the original method - - - - - This method will call the original method, bypassing the mocking layer - - - - - This method will simulate simple property behavior - - - - - Validate all expectations on a mock and ignores calls to - any method that was not setup properly. - - - - - Creates a new instance. - - The previous state for this method - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Gets a mock state that match the original mock state of the object. - - - - - Validate all expectations on a mock and ignores calls to - any method that was not setup properly. - - - - - Creates a new instance. - - The previous state for this method - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Gets a mock state that match the original mock state of the object. - - - - - Summary description for RhinoInterceptor. - - - - - Creates a new instance. - - - - - Intercept a method call and direct it to the repository. - - - - - Validate arguments for methods - - - - - Validate that the passed argument is not null. - - The object to validate - The name of the argument - - If the obj is null, an ArgumentNullException with the passed name - is thrown. - - - - - Validate that the arguments are equal. - - Expected args. - Actual Args. - - - - Validate that the two arguments are equals, including validation for - when the arguments are collections, in which case it will validate their values. - - - - - This method is safe for use even if any of the objects is a mocked object - that override equals. - - - - - Throw an object already verified when accessed - - - - - Create a new instance of VerifiedMockState - - The previous mock state, used to get the initial record state - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Verify that this mock expectations have passed. - - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Gets a mock state that match the original mock state of the object. - - - - - Get the options for the last method call - - - - - Set the exception to throw when Verify is called. - This is used to report exception that may have happened but where caught in the code. - This way, they are reported anyway when Verify() is called. - - - - - not relevant - - - - - Gets the matching verify state for this state - - - - - Get the options for the last method call - - - - - Records the actions on all the mocks created by a repository. - - - - - Records the specified call with the specified args on the mocked object. - - - - - Get the expectation for this method on this object with this arguments - - - - - This check the methods that were setup using the SetupResult.For() - or LastCall.Repeat.Any() and that bypass the whole expectation model. - - - - - Gets the all expectations for a mocked object and method combination, - regardless of the expected arguments / callbacks / contraints. - - Mocked object. - Method. - List of all relevant expectation - - - - Gets the all expectations for proxy. - - Mocked object. - List of all relevant expectation - - - - Removes all the repeatable expectations for proxy. - - Mocked object. - - - - Replaces the old expectation with the new expectation for the specified proxy/method pair. - This replace ALL expectations that equal to old expectations. - - Proxy. - Method. - Old expectation. - New expectation. - - - - Adds the recorder and turn it into the active recorder. - - Recorder. - - - - Moves to previous recorder. - - - - - Gets the recorded expectation or null. - - - - - Gets the next expected calls string. - - - - - Moves to parent recorder. - - - - - Set the expectation so it can repeat any number of times. - - - - - Removes the expectation from the recorder - - - - - Clear the replayer to call (and all its chain of replayers) - This also removes it from the list of expectations, so it will never be considered again - - - - - Get the expectation for this method on this object with this arguments - - - - - Gets a value indicating whether this instance has expectations that weren't satisfied yet. - - - true if this instance has expectations; otherwise, false. - - - - - Allows to set various options for the last method call on - a specified object. - If the method has a return value, it's recommended to use Expect - - - - - Allows to get an interface to work on the last call. - - The mocked object - Interface that allows to set options for the last method call on this object - - - - Set the return value for the method. - - The object the method will return - IRepeat that defines how many times the method will return this value - - - - Set the return value for the method. This overload is needed for LastCall.Return(null) - - The object the method will return - IRepeat that defines how many times the method will return this value - - - - Throws the specified exception when the method is called. - - Exception to throw - - - - Ignores the arguments for this method. Any argument will be matched - againt this method. - - - - - Add constraints for the method's arguments. - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Call the original method on the class, bypassing the mocking layers, for the last call. - - - - - Call the original method on the class, optionally bypassing the mocking layers, for the last call. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Gets an interface that will raise the last event when called. - - - - - Set the parameter values for out and ref parameters. - This is done using zero based indexing, and _ignoring_ any non out/ref parameter. - - - - - Documentation message for the expectation - - Message - - - - Use the property as a simple property, getting/setting the values without - causing mock expectations. - - - - - Better syntax to define repeats. - - - - - Base class for method recorders, handle delegating to inner recorder if needed. - - - - - List of the expected actions on for this recorder - The legal values are: - * Expectations - * Method Recorders - - - - - The current recorder. - - - - - The current replayer; - - - - - The parent recorder of this one, may be null. - - - - - This contains a list of all the replayers that should be ignored - for a spesific method call. A replayer gets into this list by calling - ClearReplayerToCall() on its parent. This list is Clear()ed on each new invocation. - - - - - All the repeatable methods calls. - - - - - Counts the recursion depth of the current expectation search stack - - - - - Creates a new instance. - - - - - Creates a new instance. - - Parent recorder. - Repeatable methods - - - - Records the specified call with the specified args on the mocked object. - - - - - Get the expectation for this method on this object with this arguments - - - - - Gets the all expectations for a mocked object and method combination, - regardless of the expected arguments / callbacks / contraints. - - Mocked object. - Method. - List of all relevant expectation - - - - Gets the all expectations for proxy. - - Mocked object. - List of all relevant expectation - - - - Replaces the old expectation with the new expectation for the specified proxy/method pair. - This replace ALL expectations that equal to old expectations. - - Proxy. - Method. - Old expectation. - New expectation. - - - - Remove the all repeatable expectations for proxy. - - Mocked object. - - - - Set the expectation so it can repeat any number of times. - - - - - Removes the expectation from the recorder - - - - - Adds the recorder and turn it into the active recorder. - - Recorder. - - - - Moves to previous recorder. - - - - - Moves to parent recorder. - - - - - Gets the recorded expectation or null. - - - - - Clear the replayer to call (and all its chain of replayers). - This also removes it from the list of expectations, so it will never be considered again - - - - - Get the expectation for this method on this object with this arguments - - - - - Gets the next expected calls string. - - - - - Handles the real getting of the recorded expectation or null. - - - - - Handle the real execution of this method for the derived class - - - - - Handle the real execution of this method for the derived class - - - - - Handle the real execution of this method for the derived class - - - - - Handle the real execution of this method for the derived class - - - - - Handle the real execution of this method for the derived class - - - - - Handle the real execution of this method for the derived class - - - - - Should this replayer be considered valid for this call? - - - - - This check the methods that were setup using the SetupResult.For() - or LastCall.Repeat.Any() and that bypass the whole expectation model. - - - - - Gets a value indicating whether this instance has expectations that weren't satisfied yet. - - - true if this instance has expectations; otherwise, false. - - - - - Handle the real execution of this method for the derived class - - - - - Ordered collection of methods, methods must arrive in specified order - in order to pass. - - - - - Unordered collection of method records, any expectation that exist - will be matched. - - - - - The parent recorder we have redirected to. - Useful for certain edge cases in orderring. - See: FieldProblem_Entropy for the details. - - - - - Creates a new instance. - - Parent recorder. - Repeatable methods - - - - Creates a new instance. - - - - - Records the specified call with the specified args on the mocked object. - - Mocked object. - Method. - Expectation. - - - - Get the expectation for this method on this object with this arguments - - Invocation for this method - Mocked object. - Method. - Args. - True is the call was recorded, false otherwise - - - - Gets the all expectations for a mocked object and method combination, - regardless of the expected arguments / callbacks / contraints. - - Mocked object. - Method. - List of all relevant expectation - - - - Gets the all expectations for proxy. - - Mocked object. - List of all relevant expectation - - - - Replaces the old expectation with the new expectation for the specified proxy/method pair. - This replace ALL expectations that equal to old expectations. - - Proxy. - Method. - Old expectation. - New expectation. - - - - Handle the real execution of this method for the derived class - - - - - Handles the real getting of the recorded expectation or null. - - - - - Handle the real execution of this method for the derived class - - - - - Gets the next expected calls string. - - - - - Create an exception for an unexpected method call. - - - - - Gets a value indicating whether this instance has expectations that weren't satisfied yet. - - - true if this instance has expectations; otherwise, false. - - - - - Creates a new instance. - - Parent recorder. - Repetable methods - - - - Creates a new instance. - - - - - Handles the real getting of the recorded expectation or null. - - - - - Get the expectation for this method on this object with this arguments - - - - - Gets the next expected calls string. - - - - - Hold an expectation for a method call on an object - - - - - Creates a new instance. - - Proxy. - Method. - Expectation. - - - - Determines if the object equal to this instance - - Obj. - - - - - Gets the hash code. - - - - - - Gets the proxy. - - - - - - Gets the method. - - - - - - Gets the expectation. - - - - - - Holds a pair of mocked object and a method - and allows to compare them against each other. - This allows us to have a distinction between mockOne.MyMethod() and - mockTwo.MyMethod()... - - - - - Creates a new instance. - - Proxy. - Method. - - - - Determines whatever obj equals to this instance. - ProxyMethodPairs are equal when they point to the same /instance/ of - an object, and to the same method. - - Obj. - - - - - Gets the hash code. - - - - - - Gets the proxy. - - - - - - Gets the method. - - - - - - Change the recorder from ordered to unordered and vice versa - - - - - Creates a new instance. - - - - - Disposes this instance. - - - - - Accessor for the current mocker - - - - - The current mocker - - - - - Used for [assembly: InternalsVisibleTo(RhinoMocks.StrongName)] - Used for [assembly: InternalsVisibleTo(RhinoMocks.NormalName)] - - - - - Strong name for the Dynamic Proxy assemblies. Used for InternalsVisibleTo specification. - - - - - Normal name for dynamic proxy assemblies. Used for InternalsVisibleTo specification. - - - - - Logs all method calls for methods - - - - - Setup method calls to repeat any number of times. - - - - - Get the method options and set the last method call to repeat - any number of times. - This also means that the method would transcend ordering - - - - - Get the method options for the last method call on the mockInstance and set it - to repeat any number of times. - This also means that the method would transcend ordering - - - - - Utility class for working with method calls. - - - - - Return the string representation of a method call and its arguments. - - The method - The method arguments - Invocation of the method, used to get the generics arguments - Delegate to format the parameter - The string representation of this method call - - - - Return the string representation of a method call and its arguments. - - The invocation of the method, used to get the generic parameters - The method - The method arguments - The string representation of this method call - - - - Delegate to format the argument for the string representation of - the method call. - - - - - Utility to get the default value for a type - - - - - The default value for a type. - Null for reference types and void - 0 for value types. - First element for enums - Note that we need to get the value even for opened generic types, such as those from - generic methods. - - Type. - The invocation. - the default value - - - - Allows easier access to MockRepository, works closely with Mocker.Current to - allow access to a context where the mock repository is automatially verified at - the end of the code block. - - - - - Initialize a code block where Mocker.Current is initialized. - At the end of the code block, all the expectation will be verified. - This overload will create a new MockRepository. - - The code that will be executed under the mock context - - - - Initialize a code block where Mocker.Current is initialized. - At the end of the code block, all the expectation will be verified. - This overload will create a new MockRepository. - - The mock repository to use, at the end of the code block, VerifyAll() will be called on the repository. - The code that will be executed under the mock context - - - - Create a FluentMocker - - The mock repository to use. - - - - A method with no arguments and no return value that will be called under the mock context. - - - - - FluentMocker implements some kind of fluent interface attempt - for saying "With the Mocks [mocks], Expecting (in same order) [things] verify [that]." - - - - - Interface to verify previously defined expectations - - - - - Verifies if a piece of code - - - - - Defines unordered expectations - - A delegate describing the expectations - an IMockVerifier - - - - Defines ordered expectations - - A delegate describing the expectations - an IMockVerifier - - - - Verifies previously defined expectations - - - - - This delegate is compatible with the System.Func{T,R} signature - We have to define our own to get compatability with 2.0 - - - - - This attribute is here so we can get better Pex integration - Using this means that Pex will not try to inspect the work of - the actual proxies being generated by Rhino Mocks - - - - diff --git a/Tools/nunit/lib/Skipped.png b/Tools/nunit/lib/Skipped.png deleted file mode 100644 index 7c9fc64e387..00000000000 Binary files a/Tools/nunit/lib/Skipped.png and /dev/null differ diff --git a/Tools/nunit/lib/Success.png b/Tools/nunit/lib/Success.png deleted file mode 100644 index 2a301508c65..00000000000 Binary files a/Tools/nunit/lib/Success.png and /dev/null differ diff --git a/Tools/nunit/lib/fit.dll b/Tools/nunit/lib/fit.dll deleted file mode 100644 index 40bbef0e292..00000000000 Binary files a/Tools/nunit/lib/fit.dll and /dev/null differ diff --git a/Tools/nunit/lib/log4net.dll b/Tools/nunit/lib/log4net.dll deleted file mode 100644 index 20a2e1c47de..00000000000 Binary files a/Tools/nunit/lib/log4net.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit-console-runner.dll b/Tools/nunit/lib/nunit-console-runner.dll deleted file mode 100644 index e637d6523b6..00000000000 Binary files a/Tools/nunit/lib/nunit-console-runner.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit-gui-runner.dll b/Tools/nunit/lib/nunit-gui-runner.dll deleted file mode 100644 index 820069dc050..00000000000 Binary files a/Tools/nunit/lib/nunit-gui-runner.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit.core.dll b/Tools/nunit/lib/nunit.core.dll deleted file mode 100644 index 1c57782550d..00000000000 Binary files a/Tools/nunit/lib/nunit.core.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit.core.interfaces.dll b/Tools/nunit/lib/nunit.core.interfaces.dll deleted file mode 100644 index 941d4931d98..00000000000 Binary files a/Tools/nunit/lib/nunit.core.interfaces.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit.fixtures.dll b/Tools/nunit/lib/nunit.fixtures.dll deleted file mode 100644 index 47c746ef36c..00000000000 Binary files a/Tools/nunit/lib/nunit.fixtures.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit.uiexception.dll b/Tools/nunit/lib/nunit.uiexception.dll deleted file mode 100644 index f5f712b1582..00000000000 Binary files a/Tools/nunit/lib/nunit.uiexception.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit.uikit.dll b/Tools/nunit/lib/nunit.uikit.dll deleted file mode 100644 index 398d052f1b1..00000000000 Binary files a/Tools/nunit/lib/nunit.uikit.dll and /dev/null differ diff --git a/Tools/nunit/lib/nunit.util.dll b/Tools/nunit/lib/nunit.util.dll deleted file mode 100644 index c837e9ecf06..00000000000 Binary files a/Tools/nunit/lib/nunit.util.dll and /dev/null differ diff --git a/Tools/nunit/nunit-agent-x86.exe b/Tools/nunit/nunit-agent-x86.exe deleted file mode 100644 index 8800632f9f6..00000000000 Binary files a/Tools/nunit/nunit-agent-x86.exe and /dev/null differ diff --git a/Tools/nunit/nunit-agent-x86.exe.config b/Tools/nunit/nunit-agent-x86.exe.config deleted file mode 100644 index de2caf60fde..00000000000 --- a/Tools/nunit/nunit-agent-x86.exe.config +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tools/nunit/nunit-agent.exe b/Tools/nunit/nunit-agent.exe deleted file mode 100644 index 4cb626fa810..00000000000 Binary files a/Tools/nunit/nunit-agent.exe and /dev/null differ diff --git a/Tools/nunit/nunit-agent.exe.config b/Tools/nunit/nunit-agent.exe.config deleted file mode 100644 index de2caf60fde..00000000000 --- a/Tools/nunit/nunit-agent.exe.config +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tools/nunit/nunit-console-x86.exe b/Tools/nunit/nunit-console-x86.exe deleted file mode 100644 index 0f9a832d3be..00000000000 Binary files a/Tools/nunit/nunit-console-x86.exe and /dev/null differ diff --git a/Tools/nunit/nunit-console-x86.exe.config b/Tools/nunit/nunit-console-x86.exe.config deleted file mode 100644 index 8a6a2a6a669..00000000000 --- a/Tools/nunit/nunit-console-x86.exe.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tools/nunit/nunit-console.exe b/Tools/nunit/nunit-console.exe deleted file mode 100644 index db1700badd1..00000000000 Binary files a/Tools/nunit/nunit-console.exe and /dev/null differ diff --git a/Tools/nunit/nunit-console.exe.config b/Tools/nunit/nunit-console.exe.config deleted file mode 100644 index 8a6a2a6a669..00000000000 --- a/Tools/nunit/nunit-console.exe.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tools/nunit/nunit-editor.exe b/Tools/nunit/nunit-editor.exe deleted file mode 100644 index 9c16269c1a7..00000000000 Binary files a/Tools/nunit/nunit-editor.exe and /dev/null differ diff --git a/Tools/nunit/nunit-x86.exe b/Tools/nunit/nunit-x86.exe deleted file mode 100644 index dd6483721db..00000000000 Binary files a/Tools/nunit/nunit-x86.exe and /dev/null differ diff --git a/Tools/nunit/nunit-x86.exe.config b/Tools/nunit/nunit-x86.exe.config deleted file mode 100644 index c501464f07e..00000000000 --- a/Tools/nunit/nunit-x86.exe.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tools/nunit/nunit.exe b/Tools/nunit/nunit.exe deleted file mode 100644 index b7e0ce12f91..00000000000 Binary files a/Tools/nunit/nunit.exe and /dev/null differ diff --git a/Tools/nunit/nunit.exe.config b/Tools/nunit/nunit.exe.config deleted file mode 100644 index c501464f07e..00000000000 --- a/Tools/nunit/nunit.exe.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tools/nunit/nunit.framework.dll b/Tools/nunit/nunit.framework.dll deleted file mode 100644 index 215767d2fb3..00000000000 Binary files a/Tools/nunit/nunit.framework.dll and /dev/null differ diff --git a/Tools/nunit/pnunit-agent.exe b/Tools/nunit/pnunit-agent.exe deleted file mode 100644 index 68e87cc13f7..00000000000 Binary files a/Tools/nunit/pnunit-agent.exe and /dev/null differ diff --git a/Tools/nunit/pnunit-agent.exe.config b/Tools/nunit/pnunit-agent.exe.config deleted file mode 100644 index c1516ef4189..00000000000 --- a/Tools/nunit/pnunit-agent.exe.config +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tools/nunit/pnunit-launcher.exe b/Tools/nunit/pnunit-launcher.exe deleted file mode 100644 index e03271dc43e..00000000000 Binary files a/Tools/nunit/pnunit-launcher.exe and /dev/null differ diff --git a/Tools/nunit/pnunit-launcher.exe.config b/Tools/nunit/pnunit-launcher.exe.config deleted file mode 100644 index c1516ef4189..00000000000 --- a/Tools/nunit/pnunit-launcher.exe.config +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tools/nunit/pnunit.framework.dll b/Tools/nunit/pnunit.framework.dll deleted file mode 100644 index f8cf2790d90..00000000000 Binary files a/Tools/nunit/pnunit.framework.dll and /dev/null differ diff --git a/Tools/nunit/pnunit.tests.dll b/Tools/nunit/pnunit.tests.dll deleted file mode 100644 index 6e577c9efc0..00000000000 Binary files a/Tools/nunit/pnunit.tests.dll and /dev/null differ diff --git a/Tools/nunit/runFile.exe b/Tools/nunit/runFile.exe deleted file mode 100644 index a7944586696..00000000000 Binary files a/Tools/nunit/runFile.exe and /dev/null differ diff --git a/Tools/nunit/runFile.exe.config b/Tools/nunit/runFile.exe.config deleted file mode 100644 index f58f099b6a2..00000000000 --- a/Tools/nunit/runFile.exe.config +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tools/nunit/runpnunit.bat b/Tools/nunit/runpnunit.bat deleted file mode 100644 index 43b3a69f84c..00000000000 --- a/Tools/nunit/runpnunit.bat +++ /dev/null @@ -1,3 +0,0 @@ -start pnunit-agent 8080 . -start pnunit-agent 8081 . -pnunit-launcher test.conf diff --git a/Tools/nunit/test.conf b/Tools/nunit/test.conf deleted file mode 100644 index ce825ebe30a..00000000000 --- a/Tools/nunit/test.conf +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - Testing - - - Testing - pnunit.tests.dll - TestLibraries.Testing.EqualTo19 - $agent_host:8080 - - - - - - - Parallel_Tests - - - ParallelTest_A_Test - pnunit.tests.dll - TestLibraries.ParallelExample.ParallelTest_A - $agent_host:8080 - - - 2 - - - - ParallelTest_B_Test - pnunit.tests.dll - TestLibraries.ParallelExample.ParallelTest_B - $agent_host:8080 - - 1 - - - - - - - - - Parallel_Barriers - - - Parallel_Barriers_TestA - pnunit.tests.dll - TestLibraries.ParallelExampleWithBarriers.ParallelTestWithBarriersA - $agent_host:8080 - - - - START_BARRIER - WAIT_BARRIER - - - - Parallel_Barriers_TestB - pnunit.tests.dll - TestLibraries.ParallelExampleWithBarriers.ParallelTestWithBarriersB - $agent_host:8081 - - - - START_BARRIER - WAIT_BARRIER - - - - - - - - \ No newline at end of file diff --git a/Tools/packages.config b/Tools/packages.config new file mode 100644 index 00000000000..49fb637eba4 --- /dev/null +++ b/Tools/packages.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/build-common/common-project.xml b/build-common/common-project.xml index 1720ff07972..e51353f4233 100644 --- a/build-common/common-project.xml +++ b/build-common/common-project.xml @@ -57,6 +57,9 @@ + + + @@ -115,22 +118,14 @@ description="Run NUnit tests"> + + + + - + - - - + diff --git a/src/NHibernate.Test.VisualBasic/AssemblyInfo.vb b/src/NHibernate.Test.VisualBasic/AssemblyInfo.vb new file mode 100644 index 00000000000..590f5a4f87c --- /dev/null +++ b/src/NHibernate.Test.VisualBasic/AssemblyInfo.vb @@ -0,0 +1,3 @@ +Imports NUnit.Framework + + \ No newline at end of file diff --git a/src/NHibernate.Test.VisualBasic/NHibernate.Test.VisualBasic.vbproj b/src/NHibernate.Test.VisualBasic/NHibernate.Test.VisualBasic.vbproj index 589a2143ee1..f7deb7d8f33 100644 --- a/src/NHibernate.Test.VisualBasic/NHibernate.Test.VisualBasic.vbproj +++ b/src/NHibernate.Test.VisualBasic/NHibernate.Test.VisualBasic.vbproj @@ -52,8 +52,8 @@ On - - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll + + ..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll True @@ -77,6 +77,7 @@ SharedAssemblyInfo.vb + diff --git a/src/NHibernate.Test.VisualBasic/packages.config b/src/NHibernate.Test.VisualBasic/packages.config index 01c187ccb0b..1261b7bcffd 100644 --- a/src/NHibernate.Test.VisualBasic/packages.config +++ b/src/NHibernate.Test.VisualBasic/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/src/NHibernate.Test/Ado/BatcherFixture.cs b/src/NHibernate.Test/Ado/BatcherFixture.cs index 0c770744957..835ed5c3f5f 100644 --- a/src/NHibernate.Test/Ado/BatcherFixture.cs +++ b/src/NHibernate.Test/Ado/BatcherFixture.cs @@ -177,9 +177,9 @@ public void SqlLog() sessions.Statistics.Clear(); FillDb(); string logs = sl.GetWholeLog(); - Assert.That(logs, Is.Not.StringContaining("Adding to batch").IgnoreCase); - Assert.That(logs, Is.StringContaining("Batch command").IgnoreCase); - Assert.That(logs, Is.StringContaining("INSERT").IgnoreCase); + Assert.That(logs, Does.Not.Contain("Adding to batch").IgnoreCase); + Assert.That(logs, Does.Contain("Batch command").IgnoreCase); + Assert.That(logs, Does.Contain("INSERT").IgnoreCase); } } @@ -201,13 +201,13 @@ public void AbstractBatcherLog() sessions.Statistics.Clear(); FillDb(); string logs = sl.GetWholeLog(); - Assert.That(logs, Is.StringContaining("batch").IgnoreCase); + Assert.That(logs, Does.Contain("batch").IgnoreCase); foreach (var loggingEvent in sl.Appender.GetEvents()) { string message = loggingEvent.RenderedMessage; if(message.ToLowerInvariant().Contains("insert")) { - Assert.That(message, Is.StringContaining("batch").IgnoreCase); + Assert.That(message, Does.Contain("batch").IgnoreCase); } } } @@ -227,7 +227,7 @@ public void SqlLogShouldGetBatchCommandNotification() sessions.Statistics.Clear(); FillDb(); string logs = sl.GetWholeLog(); - Assert.That(logs, Is.StringContaining("Batch commands:").IgnoreCase); + Assert.That(logs, Does.Contain("Batch commands:").IgnoreCase); } } @@ -257,8 +257,8 @@ public void AbstractBatcherLogFormattedSql() { if(sqlLine.Contains("p0")) { - Assert.That(sqlLine, Is.StringContaining("p1")); - Assert.That(sqlLine, Is.StringContaining("p2")); + Assert.That(sqlLine, Does.Contain("p1")); + Assert.That(sqlLine, Does.Contain("p2")); } } } @@ -270,4 +270,4 @@ public void AbstractBatcherLogFormattedSql() Cleanup(); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/AssemblyInfo.cs b/src/NHibernate.Test/AssemblyInfo.cs index 090d5005c3c..eefa3b611b6 100644 --- a/src/NHibernate.Test/AssemblyInfo.cs +++ b/src/NHibernate.Test/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System; using System.Reflection; +using NUnit.Framework; [assembly: CLSCompliantAttribute(false)] [assembly: AssemblyTitleAttribute("NHibernate.Test")] @@ -9,3 +10,4 @@ [assembly: AssemblyCopyrightAttribute("Licensed under LGPL.")] [assembly: AssemblyDelaySignAttribute(false)] +[assembly: LevelOfParallelism(0)] \ No newline at end of file diff --git a/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs b/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs index 17654928cb2..a721fc6f2e6 100644 --- a/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs +++ b/src/NHibernate.Test/Bytecode/Lightweight/BytecodeProviderFixture.cs @@ -28,9 +28,9 @@ public void UnableToLoadProxyFactoryFactory() } catch (HibernateByteCodeException e) { - Assert.That(e.Message, Is.StringStarting("Unable to load type")); - Assert.That(e.Message, Is.StringContaining("Possible causes")); - Assert.That(e.Message, Is.StringContaining("Confirm that your deployment folder contains")); + Assert.That(e.Message, Does.StartWith("Unable to load type")); + Assert.That(e.Message, Does.Contain("Possible causes")); + Assert.That(e.Message, Does.Contain("Confirm that your deployment folder contains")); } } @@ -62,7 +62,7 @@ public void CantCreateProxyFactoryFactory() } catch (HibernateByteCodeException e) { - Assert.That(e.Message,Is.StringStarting("Failed to create an instance of")); + Assert.That(e.Message,Does.StartWith("Failed to create an instance of")); } } @@ -156,4 +156,4 @@ public void ShouldNotThrownAnExceptionWithTheSameTypeOfCollectionTypeFactory() Assert.DoesNotThrow(() => bcp.SetCollectionTypeFactoryClass(typeof (Type.DefaultCollectionTypeFactory))); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/CacheTest/QueryKeyFixture.cs b/src/NHibernate.Test/CacheTest/QueryKeyFixture.cs index 2d56b6aaa6b..581031b0368 100644 --- a/src/NHibernate.Test/CacheTest/QueryKeyFixture.cs +++ b/src/NHibernate.Test/CacheTest/QueryKeyFixture.cs @@ -114,7 +114,7 @@ public void ToStringWithFilters() var fk = new FilterKey(filterName, f.Parameters, f.FilterDefinition.ParameterTypes, EntityMode.Poco); ISet fks = new HashSet { fk }; var qk = new QueryKey(sessions, SqlAll, new QueryParameters(), fks, null); - Assert.That(qk.ToString(), Is.StringContaining(string.Format("filters: ['{0}']",fk))); + Assert.That(qk.ToString(), Does.Contain(string.Format("filters: ['{0}']",fk))); filterName = "DescriptionEqualAndValueGT"; f = new FilterImpl(sessions.GetFilterDefinition(filterName)); @@ -122,7 +122,7 @@ public void ToStringWithFilters() fk = new FilterKey(filterName, f.Parameters, f.FilterDefinition.ParameterTypes, EntityMode.Poco); fks = new HashSet { fk }; qk = new QueryKey(sessions, SqlAll, new QueryParameters(), fks, null); - Assert.That(qk.ToString(), Is.StringContaining(string.Format("filters: ['{0}']", fk))); + Assert.That(qk.ToString(), Does.Contain(string.Format("filters: ['{0}']", fk))); } [Test] @@ -140,7 +140,7 @@ public void ToStringWithMoreFilters() ISet fks = new HashSet { fk, fvk }; var qk = new QueryKey(sessions, SqlAll, new QueryParameters(), fks, null); - Assert.That(qk.ToString(), Is.StringContaining(string.Format("filters: ['{0}', '{1}']", fk, fvk))); + Assert.That(qk.ToString(), Does.Contain(string.Format("filters: ['{0}', '{1}']", fk, fvk))); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/CfgTest/CustomBytecodeProviderTest.cs b/src/NHibernate.Test/CfgTest/CustomBytecodeProviderTest.cs index c39cf629650..3f45f9079a1 100644 --- a/src/NHibernate.Test/CfgTest/CustomBytecodeProviderTest.cs +++ b/src/NHibernate.Test/CfgTest/CustomBytecodeProviderTest.cs @@ -55,7 +55,7 @@ public void WhenNoDefaultCtorThenThrow() { var properties = new Dictionary { { Environment.PropertyBytecodeProvider, typeof(InvalidNoCtorByteCodeProvider).AssemblyQualifiedName } }; Assert.That(() => Environment.BuildBytecodeProvider(properties), Throws.TypeOf() - .And.InnerException.Message.ContainsSubstring("constructor was not found")); + .And.InnerException.Message.Contains("constructor was not found")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/CfgTest/DefaultNsAssmFixture.cs b/src/NHibernate.Test/CfgTest/DefaultNsAssmFixture.cs index 00041aec38b..78dda495202 100644 --- a/src/NHibernate.Test/CfgTest/DefaultNsAssmFixture.cs +++ b/src/NHibernate.Test/CfgTest/DefaultNsAssmFixture.cs @@ -94,7 +94,7 @@ public class DefaultNsAssmFixture #region NUnit.Framework.TestFixture Members - [TestFixtureSetUp] + [OneTimeSetUp] public void TestFixtureSetUp() { dir_ = TestContext.CurrentContext.TestDirectory; @@ -138,7 +138,7 @@ public virtual void TearDown() { } - [TestFixtureTearDown] + [OneTimeTearDown] public virtual void TestFixtureTearDown() { } @@ -217,4 +217,4 @@ public void MixedSubclass() // if no exception, success } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/CfgTest/HbmOrderingFixture.cs b/src/NHibernate.Test/CfgTest/HbmOrderingFixture.cs index 7f09b804dbc..1708979ac92 100644 --- a/src/NHibernate.Test/CfgTest/HbmOrderingFixture.cs +++ b/src/NHibernate.Test/CfgTest/HbmOrderingFixture.cs @@ -132,7 +132,7 @@ public class HbmOrderingFixture #region NUnit.Framework.TestFixture Members - [TestFixtureSetUp] + [OneTimeSetUp] public void TestFixtureSetUp() { dir_ = TestContext.CurrentContext.TestDirectory; @@ -176,7 +176,7 @@ public virtual void TearDown() { } - [TestFixtureTearDown] + [OneTimeTearDown] public virtual void TestFixtureTearDown() { } @@ -255,4 +255,4 @@ public void MixedSubclass() // if no exception, success } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/CfgTest/Loquacious/EntityCacheConfigurationFixture.cs b/src/NHibernate.Test/CfgTest/Loquacious/EntityCacheConfigurationFixture.cs index b14dbe1217f..a1b0292da74 100644 --- a/src/NHibernate.Test/CfgTest/Loquacious/EntityCacheConfigurationFixture.cs +++ b/src/NHibernate.Test/CfgTest/Loquacious/EntityCacheConfigurationFixture.cs @@ -77,7 +77,7 @@ public void NotAllowRelatedCollections() var exception = Assert.Throws( () => configure.EntityCache(ce => ce.Collection(e => e.Relation.Elements, cc => { }))); - Assert.That(exception.Message, Is.StringContaining("Collection not owned by")); + Assert.That(exception.Message, Does.Contain("Collection not owned by")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Component/Basic/ComponentWithUniqueConstraintTests.cs b/src/NHibernate.Test/Component/Basic/ComponentWithUniqueConstraintTests.cs index da980283fe2..8400d67f786 100644 --- a/src/NHibernate.Test/Component/Basic/ComponentWithUniqueConstraintTests.cs +++ b/src/NHibernate.Test/Component/Basic/ComponentWithUniqueConstraintTests.cs @@ -84,9 +84,9 @@ public void CannotBePersistedWithNonUniqueValues() }); Assert.That(exception.InnerException, Is.AssignableTo()); Assert.That(exception.InnerException.Message, - Is.StringContaining("unique").IgnoreCase.And.StringContaining("constraint").IgnoreCase - .Or.StringContaining("duplicate entry").IgnoreCase); + Does.Contain("unique").IgnoreCase.And.Contains("constraint").IgnoreCase + .Or.Contains("duplicate entry").IgnoreCase); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Criteria/Lambda/CriteriaAssertFixture.cs b/src/NHibernate.Test/Criteria/Lambda/CriteriaAssertFixture.cs index 063b57f2f4b..58c230202be 100644 --- a/src/NHibernate.Test/Criteria/Lambda/CriteriaAssertFixture.cs +++ b/src/NHibernate.Test/Criteria/Lambda/CriteriaAssertFixture.cs @@ -18,12 +18,12 @@ private void AssertCriteriaAreNotEqual(ICriteria expected, ICriteria actual) try { AssertCriteriaAreEqual(expected, actual); + Assert.Fail("No exception thrown"); } catch { - return; + Assert.Pass(); } - Assert.Fail("No exception thrown"); } private void AssertCriteriaAreNotEqual(DetachedCriteria expected, DetachedCriteria actual) @@ -31,12 +31,12 @@ private void AssertCriteriaAreNotEqual(DetachedCriteria expected, DetachedCriter try { AssertCriteriaAreEqual(expected, actual); + Assert.Fail("No exception thrown"); } catch { - return; + Assert.Pass(); } - Assert.Fail("No exception thrown"); } [Test] diff --git a/src/NHibernate.Test/Events/PostEvents/PostUpdateFixture.cs b/src/NHibernate.Test/Events/PostEvents/PostUpdateFixture.cs index 8be73a23607..75096a76847 100644 --- a/src/NHibernate.Test/Events/PostEvents/PostUpdateFixture.cs +++ b/src/NHibernate.Test/Events/PostEvents/PostUpdateFixture.cs @@ -40,7 +40,7 @@ public void ImplicitFlush() tx.Commit(); } } - Assert.That(ls.GetWholeLog(), Is.StringContaining(AssertOldStatePostListener.LogMessage)); + Assert.That(ls.GetWholeLog(), Does.Contain(AssertOldStatePostListener.LogMessage)); } DbCleanup(); @@ -69,7 +69,7 @@ public void ExplicitUpdate() tx.Commit(); } } - Assert.That(ls.GetWholeLog(), Is.StringContaining(AssertOldStatePostListener.LogMessage)); + Assert.That(ls.GetWholeLog(), Does.Contain(AssertOldStatePostListener.LogMessage)); } DbCleanup(); @@ -107,7 +107,7 @@ public void WithDetachedObject() tx.Commit(); } } - Assert.That(ls.GetWholeLog(), Is.StringContaining(AssertOldStatePostListener.LogMessage)); + Assert.That(ls.GetWholeLog(), Does.Contain(AssertOldStatePostListener.LogMessage)); } DbCleanup(); @@ -147,7 +147,7 @@ public void UpdateDetachedObject() tx.Commit(); } } - Assert.That(ls.GetWholeLog(), Is.StringContaining(AssertOldStatePostListener.LogMessage)); + Assert.That(ls.GetWholeLog(), Does.Contain(AssertOldStatePostListener.LogMessage)); } DbCleanup(); @@ -186,7 +186,7 @@ public void UpdateDetachedObjectWithLock() tx.Commit(); } } - Assert.That(ls.GetWholeLog(), Is.StringContaining(AssertOldStatePostListener.LogMessage)); + Assert.That(ls.GetWholeLog(), Does.Contain(AssertOldStatePostListener.LogMessage)); } DbCleanup(); @@ -216,4 +216,4 @@ private void FillDb() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/ExpressionTest/InExpressionFixture.cs b/src/NHibernate.Test/ExpressionTest/InExpressionFixture.cs index 7ff6a03db51..49e40985b37 100644 --- a/src/NHibernate.Test/ExpressionTest/InExpressionFixture.cs +++ b/src/NHibernate.Test/ExpressionTest/InExpressionFixture.cs @@ -60,8 +60,8 @@ public void InSqlFunctionTest() // Allow some dialectal differences in function name and parameter style. Assert.That(sql.ToString(), - Is.StringStarting("substring(sql_alias.Name").Or.StringStarting("substr(sql_alias.Name")); - Assert.That(sql.ToString(), Is.StringEnding(") in (?, ?)")); + Does.StartWith("substring(sql_alias.Name").Or.StartsWith("substr(sql_alias.Name")); + Assert.That(sql.ToString(), Does.EndWith(") in (?, ?)")); // Ensure no parameters are duplicated. var parameters = criteriaQuery.CollectedParameters.ToList(); @@ -73,4 +73,4 @@ public void InSqlFunctionTest() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/FilterTest/ConfigFixture.cs b/src/NHibernate.Test/FilterTest/ConfigFixture.cs index 61713bdde11..6e908cfd850 100644 --- a/src/NHibernate.Test/FilterTest/ConfigFixture.cs +++ b/src/NHibernate.Test/FilterTest/ConfigFixture.cs @@ -57,7 +57,7 @@ public void WrongFilterDefInClass() var cfg = GetConfiguration(); var e = Assert.Throws(() => cfg.AddResource("NHibernate.Test.FilterTest.WrongFilterDefInClass.hbm.xml", GetType().Assembly)); Assert.That(e.InnerException, Is.Not.Null); - Assert.That(e.InnerException.Message, Is.StringStarting("no filter condition").IgnoreCase); + Assert.That(e.InnerException.Message, Does.StartWith("no filter condition").IgnoreCase); } [Test] @@ -93,7 +93,7 @@ public void WrongFilterDefInClassSeconPass() cfg.AddXmlString(wrongClassMap); cfg.AddXmlString(wrongFilterDef); var e = Assert.Throws(cfg.BuildMappings); - Assert.That(e.Message, Is.StringStarting("no filter condition").IgnoreCase); + Assert.That(e.Message, Does.StartWith("no filter condition").IgnoreCase); } [Test] @@ -103,8 +103,8 @@ public void AddClassWithFiltersWithoutFilterDef() var cfg = GetConfiguration(); cfg.AddResource("NHibernate.Test.FilterTest.SimpleFiltered.hbm.xml", GetType().Assembly); var e = Assert.Throws(cfg.BuildMappings); - Assert.That(e.Message, Is.StringStarting("filter-def for filter named")); - Assert.That(e.Message, Is.StringContaining("was not found")); + Assert.That(e.Message, Does.StartWith("filter-def for filter named")); + Assert.That(e.Message, Does.Contain("was not found")); } [Test] @@ -197,7 +197,7 @@ public void DuplicatedFilterDef() var cfg = GetConfiguration(); var e = Assert.Throws(() => cfg.AddXmlString(filterDef)); Assert.That(e.InnerException, Is.Not.Null); - Assert.That(e.InnerException.Message, Is.StringContaining("Duplicated filter-def")); + Assert.That(e.InnerException.Message, Does.Contain("Duplicated filter-def")); } [Test] @@ -223,8 +223,8 @@ public void MissedFilterDef() var cfg = GetConfiguration(); cfg.AddXmlString(classMap); var e = Assert.Throws(()=>cfg.BuildSessionFactory()); - Assert.That(e.Message, Is.StringStarting("filter-def for filter named")); - Assert.That(e.Message, Is.StringContaining("was not found")); + Assert.That(e.Message, Does.StartWith("filter-def for filter named")); + Assert.That(e.Message, Does.Contain("was not found")); } [Test] @@ -248,8 +248,8 @@ public void FilterDefWithoutReference() cfg.BuildSessionFactory(); var wholeLog = String.Join("\r\n", memoryAppender.GetEvents().Select(x => x.RenderedMessage).ToArray()); - Assert.That(wholeLog, Is.StringContaining("filter-def for filter named")); - Assert.That(wholeLog, Is.StringContaining("was never used to filter classes nor collections.")); + Assert.That(wholeLog, Does.Contain("filter-def for filter named")); + Assert.That(wholeLog, Does.Contain("was never used to filter classes nor collections.")); } finally { diff --git a/src/NHibernate.Test/GhostProperty/GhostPropertyFixture.cs b/src/NHibernate.Test/GhostProperty/GhostPropertyFixture.cs index e9cd5847236..1422552c4db 100644 --- a/src/NHibernate.Test/GhostProperty/GhostPropertyFixture.cs +++ b/src/NHibernate.Test/GhostProperty/GhostPropertyFixture.cs @@ -127,7 +127,7 @@ public void WillLoadGhostAssociationOnAccess() { order = s.Get(1); var logMessage = ls.GetWholeLog(); - Assert.That(logMessage, Is.Not.StringContaining("FROM Payment")); + Assert.That(logMessage, Does.Not.Contain("FROM Payment")); } Assert.That(NHibernateUtil.IsPropertyInitialized(order, "Payment"), Is.False); @@ -147,8 +147,8 @@ public void WhenGetThenLoadOnlyNoLazyPlainProperties() { order = s.Get(1); var logMessage = ls.GetWholeLog(); - Assert.That(logMessage, Is.Not.StringContaining("ALazyProperty")); - Assert.That(logMessage, Is.StringContaining("NoLazyProperty")); + Assert.That(logMessage, Does.Not.Contain("ALazyProperty")); + Assert.That(logMessage, Does.Contain("NoLazyProperty")); } Assert.That(NHibernateUtil.IsPropertyInitialized(order, "NoLazyProperty"), Is.True); Assert.That(NHibernateUtil.IsPropertyInitialized(order, "ALazyProperty"), Is.False); @@ -157,10 +157,10 @@ public void WhenGetThenLoadOnlyNoLazyPlainProperties() { var x = order.ALazyProperty; var logMessage = ls.GetWholeLog(); - Assert.That(logMessage, Is.StringContaining("ALazyProperty")); + Assert.That(logMessage, Does.Contain("ALazyProperty")); } Assert.That(NHibernateUtil.IsPropertyInitialized(order, "ALazyProperty"), Is.True); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Hql/Ast/BulkManipulation.cs b/src/NHibernate.Test/Hql/Ast/BulkManipulation.cs index eb935df6cf6..fcdf0cbe2da 100644 --- a/src/NHibernate.Test/Hql/Ast/BulkManipulation.cs +++ b/src/NHibernate.Test/Hql/Ast/BulkManipulation.cs @@ -544,7 +544,7 @@ public void UpdateOnImplicitJoinFails() var e = Assert.Throws( () => s.CreateQuery("update Human set mother.name.initial = :initial").SetString("initial", "F").ExecuteUpdate()); - Assert.That(e.Message, Is.StringStarting("Implied join paths are not assignable in update")); + Assert.That(e.Message, Does.StartWith("Implied join paths are not assignable in update")); s.CreateQuery("delete Human where mother is not null").ExecuteUpdate(); s.CreateQuery("delete Human").ExecuteUpdate(); @@ -725,7 +725,7 @@ public void WrongPropertyNameThrowQueryException() using (ISession s = OpenSession()) { var e = Assert.Throws(() => s.CreateQuery("update Vehicle set owner = null where owner = 'Steve'").ExecuteUpdate()); - Assert.That(e.Message, Is.StringStarting("Left side of assigment should be a case sensitive property or a field")); + Assert.That(e.Message, Does.StartWith("Left side of assigment should be a case sensitive property or a field")); } } @@ -1120,4 +1120,4 @@ public void Cleanup() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Hql/Ast/QuerySubstitutionTest.cs b/src/NHibernate.Test/Hql/Ast/QuerySubstitutionTest.cs index 0b669217dd9..9d53642bfe1 100644 --- a/src/NHibernate.Test/Hql/Ast/QuerySubstitutionTest.cs +++ b/src/NHibernate.Test/Hql/Ast/QuerySubstitutionTest.cs @@ -18,7 +18,7 @@ public void WhenSubstitutionsConfiguredThenUseItInTranslation() { const string query = "from SimpleClass s where s.IntValue > pizza"; var sql = GetSql(query, new Dictionary{{"pizza","1"}}); - Assert.That(sql, Is.Not.StringContaining("pizza")); + Assert.That(sql, Does.Not.Contain("pizza")); } [Test] @@ -31,7 +31,7 @@ public void WhenExecutedThroughSessionThenUseSubstitutions() { s.CreateQuery(query).List(); string sql = sqlLogSpy.Appender.GetEvents()[0].RenderedMessage; - Assert.That(sql, Is.Not.StringContaining("pizza")); + Assert.That(sql, Does.Not.Contain("pizza")); } } } @@ -41,7 +41,7 @@ public void WhenSubstitutionsWithStringConfiguredThenUseItInTranslation() { const string query = "from SimpleClass s where s.Description > calda"; var sql = GetSql(query, new Dictionary { { "calda", "'bobrock'" } }); - Assert.That(sql, Is.Not.StringContaining("pizza").And.Contains("'bobrock'")); + Assert.That(sql, Does.Not.Contain("pizza").And.Contains("'bobrock'")); } [Test] @@ -54,9 +54,9 @@ public void WhenExecutedThroughSessionThenUseSubstitutionsWithString() { s.CreateQuery(query).List(); string sql = sqlLogSpy.Appender.GetEvents()[0].RenderedMessage; - Assert.That(sql, Is.Not.StringContaining("pizza").And.Contains("'bobrock'")); + Assert.That(sql, Does.Not.Contain("pizza").And.Contains("'bobrock'")); } } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Hql/Ast/SqlTranslationFixture.cs b/src/NHibernate.Test/Hql/Ast/SqlTranslationFixture.cs index 250fc9a6d98..2e2cd4cddff 100644 --- a/src/NHibernate.Test/Hql/Ast/SqlTranslationFixture.cs +++ b/src/NHibernate.Test/Hql/Ast/SqlTranslationFixture.cs @@ -10,7 +10,7 @@ public void ParseFloatConstant() { const string query = "select 123.5, s from SimpleClass s"; - Assert.That(GetSql(query), Is.StringStarting("select 123.5")); + Assert.That(GetSql(query), Does.StartWith("select 123.5")); } [Test] @@ -30,4 +30,4 @@ public void Union() Assert.DoesNotThrow(() => GetSql(queryForAntlr)); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/IdGen/NativeGuid/NativeGuidGeneratorFixture.cs b/src/NHibernate.Test/IdGen/NativeGuid/NativeGuidGeneratorFixture.cs index 038bdb81f5e..a3c0c6e8bb8 100644 --- a/src/NHibernate.Test/IdGen/NativeGuid/NativeGuidGeneratorFixture.cs +++ b/src/NHibernate.Test/IdGen/NativeGuid/NativeGuidGeneratorFixture.cs @@ -12,7 +12,7 @@ public class NativeGuidGeneratorFixture protected Configuration cfg; protected ISessionFactoryImplementor sessions; - [TestFixtureSetUp] + [OneTimeSetUp] public void TestFixtureSetUp() { cfg = new Configuration(); @@ -43,4 +43,4 @@ public void ReturnedValueIsGuid() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/IdTest/TableGeneratorFixture.cs b/src/NHibernate.Test/IdTest/TableGeneratorFixture.cs index ee356826462..17dccd6508e 100644 --- a/src/NHibernate.Test/IdTest/TableGeneratorFixture.cs +++ b/src/NHibernate.Test/IdTest/TableGeneratorFixture.cs @@ -22,8 +22,8 @@ public void SelectAndUpdateStringContainCustomWhere() var dialect = new MsSql2005Dialect(); var tg = new TableGenerator(); tg.Configure(NHibernateUtil.Int64, new Dictionary {{"where", customWhere}}, dialect); - Assert.That(selectSql.GetValue(tg).ToString(), Is.StringContaining(customWhere)); - Assert.That(updateSql.GetValue(tg).ToString(), Is.StringContaining(customWhere)); + Assert.That(selectSql.GetValue(tg).ToString(), Does.Contain(customWhere)); + Assert.That(updateSql.GetValue(tg).ToString(), Does.Contain(customWhere)); } } } diff --git a/src/NHibernate.Test/Linq/ByMethod/GroupByTests.cs b/src/NHibernate.Test/Linq/ByMethod/GroupByTests.cs index e358edb3a6e..d4e5a061153 100644 --- a/src/NHibernate.Test/Linq/ByMethod/GroupByTests.cs +++ b/src/NHibernate.Test/Linq/ByMethod/GroupByTests.cs @@ -63,7 +63,7 @@ into g select g.Key).ToList(); Assert.That(orders.Count, Is.EqualTo(481)); - Assert.That(Regex.Replace(spy.GetWholeLog(), @"\s+", " "), Is.StringContaining("group by order0_.OrderDate")); + Assert.That(Regex.Replace(spy.GetWholeLog(), @"\s+", " "), Does.Contain("group by order0_.OrderDate")); } } diff --git a/src/NHibernate.Test/Linq/DynamicQueryTests.cs b/src/NHibernate.Test/Linq/DynamicQueryTests.cs index 46425ce216e..9943f23d23d 100644 --- a/src/NHibernate.Test/Linq/DynamicQueryTests.cs +++ b/src/NHibernate.Test/Linq/DynamicQueryTests.cs @@ -34,7 +34,7 @@ public void CanCahceDynamicLinq() using (var log = new SqlLogSpy()) { users.ToList(); - Assert.IsNullOrEmpty(log.GetWholeLog()); + Assert.That(log.GetWholeLog(), Is.Null.Or.Empty); } } } diff --git a/src/NHibernate.Test/Linq/LinqReadonlyTestsContext.cs b/src/NHibernate.Test/Linq/LinqReadonlyTestsContext.cs index 04ec017e668..9b53d141e6b 100644 --- a/src/NHibernate.Test/Linq/LinqReadonlyTestsContext.cs +++ b/src/NHibernate.Test/Linq/LinqReadonlyTestsContext.cs @@ -48,7 +48,7 @@ private IEnumerable Mappings } } - [SetUp] + [OneTimeSetUp] public void CreateNorthwindDb() { Configuration configuration = Configure(); @@ -85,7 +85,7 @@ private void ExecuteScriptFile(Configuration configuration, string scripFileName } } - [TearDown] + [OneTimeTearDown] public void DestroyNorthwindDb() { Configuration configuration = Configure(); diff --git a/src/NHibernate.Test/Linq/LoggingTests.cs b/src/NHibernate.Test/Linq/LoggingTests.cs index a42e7aa5eef..b89ef0f49fd 100644 --- a/src/NHibernate.Test/Linq/LoggingTests.cs +++ b/src/NHibernate.Test/Linq/LoggingTests.cs @@ -23,7 +23,7 @@ public void PageBetweenProjections() const string expected = "Expression (partially evaluated): value(NHibernate.Linq.NhQueryable`1[NHibernate.DomainModel.Northwind.Entities.Product]).Where(p => value(NHibernate.Linq.NhQueryable`1[NHibernate.DomainModel.Northwind.Entities.Product]).Where(p => (p.ProductId > 5)).Contains(p)).Skip(5).Take(10)"; - Assert.That(logtext, Is.StringContaining(expected)); + Assert.That(logtext, Does.Contain(expected)); } } @@ -50,7 +50,7 @@ public void CanLogLinqExpressionWithoutInitializingContainedProxy() string expectedLog = "Expression (partially evaluated): value(NHibernate.Linq.NhQueryable`1[NHibernate.DomainModel.Northwind.Entities.Product])" + ".Where(product => (product == Product#" + productId + ")).Count()"; - Assert.That(actualLog, Is.StringContaining(expectedLog)); + Assert.That(actualLog, Does.Contain(expectedLog)); // And verify that the proxy in the expression wasn't initialized. Assert.That(NHibernateUtil.IsInitialized(productProxy), Is.False, diff --git a/src/NHibernate.Test/Linq/WhereTests.cs b/src/NHibernate.Test/Linq/WhereTests.cs index 082b933def9..2f8f66e5c0a 100644 --- a/src/NHibernate.Test/Linq/WhereTests.cs +++ b/src/NHibernate.Test/Linq/WhereTests.cs @@ -753,7 +753,7 @@ public void CanUseCompareInQueryWithNonConstantZero() // This should generate SQL with some nested case expressions - it should not be // simplified. string wholeLog = ls.GetWholeLog(); - Assert.That(wholeLog, Is.StringContaining("when lower(product0_.ProductName)=")); + Assert.That(wholeLog, Does.Contain("when lower(product0_.ProductName)=")); } } @@ -769,7 +769,7 @@ public void CanUseCompareInQuery(Expression> expression, int Assert.That(result, Has.Count.EqualTo(expectedCount)); string wholeLog = ls.GetWholeLog(); - Assert.That(wholeLog, expectCase ? Is.StringContaining("case") : Is.Not.StringContaining("case")); + Assert.That(wholeLog, expectCase ? Does.Contain("case") : Does.Not.Contain("case")); } } diff --git a/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsAccessorTests.cs b/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsAccessorTests.cs index dd4c5d9c347..8c03c86b46b 100644 --- a/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsAccessorTests.cs +++ b/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsAccessorTests.cs @@ -44,7 +44,7 @@ public void WhenMapComoponetWithNestBidirectionalComponentThenMapParentAccessor( var hbmClass = mapping.RootClasses[0]; var hbmMyCompo = hbmClass.Properties.OfType().Single(); - Assert.That(hbmMyCompo.Access, Is.StringContaining("camelcase")); + Assert.That(hbmMyCompo.Access, Does.Contain("camelcase")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsParentAccessorTests.cs b/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsParentAccessorTests.cs index cc59597b991..6999d5ab43e 100644 --- a/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsParentAccessorTests.cs +++ b/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/ComponetsParentAccessorTests.cs @@ -68,7 +68,7 @@ public void WhenMapComoponetWithNestBidirectionalComponentThenMapParentAccessor( var hbmMyCompo = hbmClass.Properties.OfType().Single(); var hbmMyNestedCompo = hbmMyCompo.Properties.OfType().Single(); - Assert.That(hbmMyNestedCompo.Parent.access, Is.StringContaining("camelcase")); + Assert.That(hbmMyNestedCompo.Parent.access, Does.Contain("camelcase")); } [Test] @@ -82,7 +82,7 @@ public void WhenCollectionOfComoponetsWithNestBidirectionalComponentThenMapParen var hbmMyCompo = (HbmCompositeElement)hbmBag.ElementRelationship; var hbmMyNestedCompo = hbmMyCompo.Properties.OfType().Single(); - Assert.That(hbmMyNestedCompo.Parent.access, Is.StringContaining("camelcase")); + Assert.That(hbmMyNestedCompo.Parent.access, Does.Contain("camelcase")); } [Test, Ignore("No fixed yet. When the parent is an entity it should be managed explicitly as explicitly is managed the relation (Parent instead many-to-one)")] @@ -92,7 +92,7 @@ public void WhenMapComoponetWithParentThenMapParentAccessor() var hbmClass = mapping.RootClasses[0]; var hbmMyCompo = hbmClass.Properties.OfType().Single(); - Assert.That(hbmMyCompo.Parent.access, Is.StringContaining("camelcase")); + Assert.That(hbmMyCompo.Parent.access, Does.Contain("camelcase")); } [Test, Ignore("No fixed yet. When the parent is an entity it should be managed explicitly as explicitly is managed the relation (Parent instead many-to-one)")] @@ -104,7 +104,7 @@ public void WhenCollectionOfComoponetsWithParentThenMapParentAccessor() var hbmBag = hbmClass.Properties.OfType().Single(); var hbmMyCompo = (HbmCompositeElement)hbmBag.ElementRelationship; - Assert.That(hbmMyCompo.Parent.access, Is.StringContaining("camelcase")); + Assert.That(hbmMyCompo.Parent.access, Does.Contain("camelcase")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/PropertyToFieldAccessorTest.cs b/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/PropertyToFieldAccessorTest.cs index 80c32c951a6..b98845f88a7 100644 --- a/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/PropertyToFieldAccessorTest.cs +++ b/src/NHibernate.Test/MappingByCode/ConventionModelMapperTests/PropertyToFieldAccessorTest.cs @@ -88,7 +88,7 @@ public void WhenReadOnlyPropertyWithSameBackFieldNoMatch() var hbmClass = hbmMapping.RootClasses[0]; var hbmProperty = hbmClass.Properties.Single(x => x.Name == "ReadOnlyWithSameBackField"); - Assert.That(hbmProperty.Access, Is.Not.StringContaining("field")); + Assert.That(hbmProperty.Access, Does.Not.Contain("field")); } [Test] @@ -101,7 +101,7 @@ public void WhenPropertyWithoutFieldNoMatch() var hbmClass = hbmMapping.RootClasses[0]; var hbmProperty = hbmClass.Properties.Single(x => x.Name == "PropertyWithoutField"); - Assert.That(hbmProperty.Access, Is.Not.StringContaining("field")); + Assert.That(hbmProperty.Access, Does.Not.Contain("field")); } [Test] @@ -112,7 +112,7 @@ public void WhenPropertyWithDifferentBackFieldMatch() var hbmClass = hbmMapping.RootClasses[0]; var hbmProperty = hbmClass.Properties.Single(x => x.Name == "WithDifferentBackField"); - Assert.That(hbmProperty.Access, Is.StringContaining("field")); + Assert.That(hbmProperty.Access, Does.Contain("field")); } [Test] @@ -123,7 +123,7 @@ public void WhenSetOnlyPropertyNoMatch() var hbmClass = hbmMapping.RootClasses[0]; var hbmProperty = hbmClass.Properties.Single(x => x.Name == "SetOnlyProperty"); - Assert.That(hbmProperty.Access, Is.Not.StringContaining("field")); + Assert.That(hbmProperty.Access, Is.Null.Or.Not.Contain("field")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/BagOfNestedComponentsWithParentTest.cs b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/BagOfNestedComponentsWithParentTest.cs index 9cc8336e1d6..e8cd3adb92d 100644 --- a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/BagOfNestedComponentsWithParentTest.cs +++ b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/BagOfNestedComponentsWithParentTest.cs @@ -103,7 +103,7 @@ private void VerifyMapping(HbmMapping mapping, bool hasParent, params string[] p var collection = (HbmBag)relation; Assert.That(collection.ElementRelationship, Is.TypeOf()); var elementRelation = (HbmCompositeElement)collection.ElementRelationship; - Assert.That(elementRelation.Class, Is.StringContaining("Address")); + Assert.That(elementRelation.Class, Does.Contain("Address")); // This test was modified because when the "owner" is an entity it can be mapped as many-to-one or as parent and without an explicit // definition of the property representing the bidiretional-relation we can't know is the mapping element (many-to-one or parent) @@ -123,10 +123,10 @@ private void VerifyMapping(HbmMapping mapping, bool hasParent, params string[] p var propertyNestedRelation = elementRelation.Properties.FirstOrDefault(p => p.Name == "Number"); Assert.That(propertyNestedRelation, Is.Not.Null.And.TypeOf()); var nestedRelation = (HbmNestedCompositeElement) propertyNestedRelation; - Assert.That(nestedRelation.Class, Is.StringContaining("Number")); + Assert.That(nestedRelation.Class, Does.Contain("Number")); Assert.That(nestedRelation.Properties.Count(), Is.EqualTo(1)); Assert.That(nestedRelation.Parent, Is.Not.Null); Assert.That(nestedRelation.Parent.name, Is.EqualTo("OwnerAddress")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ComponentAsIdTests.cs b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ComponentAsIdTests.cs index 44a7be27918..3a56f4de11e 100644 --- a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ComponentAsIdTests.cs +++ b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ComponentAsIdTests.cs @@ -87,8 +87,8 @@ public void WhenMapComponentAsIdAttributesThenMapAttributes() var hbmMapping = mapper.CompileMappingFor(new[] { typeof(MyClass) }); var hbmClass = hbmMapping.RootClasses[0]; var hbmCompositId = hbmClass.CompositeId; - Assert.That(hbmCompositId.access, Is.StringContaining("field")); - Assert.That(hbmCompositId.@class, Is.StringContaining("MyComponent")); + Assert.That(hbmCompositId.access, Does.Contain("field")); + Assert.That(hbmCompositId.@class, Does.Contain("MyComponent")); } [Test] @@ -147,8 +147,8 @@ public void WhenMapAttributesOfCustomizedComponentUsedAsComponentAsIdWithCustomi var hbmMapping = mapper.CompileMappingFor(new[] { typeof(MyClass) }); var hbmClass = hbmMapping.RootClasses[0]; var hbmCompositId = hbmClass.CompositeId; - Assert.That(hbmCompositId.access, Is.StringContaining("field")); - Assert.That(hbmCompositId.@class, Is.StringContaining("MyComponent")); + Assert.That(hbmCompositId.access, Does.Contain("field")); + Assert.That(hbmCompositId.@class, Does.Contain("MyComponent")); } [Test] @@ -165,8 +165,8 @@ public void WhenMapAttributesOfCustomizedComponentUsedAsComponentAsIdWithCustomi var hbmMapping = mapper.CompileMappingFor(new[] { typeof(MyClass) }); var hbmClass = hbmMapping.RootClasses[0]; var hbmCompositId = hbmClass.CompositeId; - Assert.That(hbmCompositId.access, Is.StringContaining("nosetter")); - Assert.That(hbmCompositId.@class, Is.StringContaining("MyComponent")); + Assert.That(hbmCompositId.access, Does.Contain("nosetter")); + Assert.That(hbmCompositId.@class, Does.Contain("MyComponent")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/JoinedSubclassMappingRegistration.cs b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/JoinedSubclassMappingRegistration.cs index 2f00a049c77..df894816269 100644 --- a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/JoinedSubclassMappingRegistration.cs +++ b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/JoinedSubclassMappingRegistration.cs @@ -64,10 +64,10 @@ private void ModelIsWellFormed(HbmMapping hbmMapping) { var hbmClass = hbmMapping.JoinedSubclasses.Single(); Assert.That(hbmClass, Is.Not.Null); - Assert.That(hbmClass.extends, Is.StringContaining("MyClass")); + Assert.That(hbmClass.extends, Does.Contain("MyClass")); var hbmProperty = hbmClass.Properties.OfType().Single(); Assert.That(hbmProperty.name, Is.EqualTo("SomethingElse")); Assert.That(hbmProperty.length, Is.EqualTo("15")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/ModelMapperAddMappingByTypeTests.cs b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/ModelMapperAddMappingByTypeTests.cs index 1e556611708..6964f43eee3 100644 --- a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/ModelMapperAddMappingByTypeTests.cs +++ b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/ModelMapperAddMappingByTypeTests.cs @@ -17,7 +17,7 @@ public WithOutPublicParameterLessCtor(string something) public void WhenRegisterClassMappingThroughTypeThenCheckIConformistHoldersProvider() { var mapper = new ModelMapper(); - Assert.That(() => mapper.AddMapping(typeof (object)), Throws.TypeOf().And.Message.ContainsSubstring("IConformistHoldersProvider")); + Assert.That(() => mapper.AddMapping(typeof (object)), Throws.TypeOf().And.Message.Contains("IConformistHoldersProvider")); } [Test] @@ -27,4 +27,4 @@ public void WhenRegisterClassMappingThroughTypeThenCheckParameterLessCtor() Assert.That(() => mapper.AddMapping(typeof (WithOutPublicParameterLessCtor)), Throws.TypeOf()); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/SubclassMappingRegistration.cs b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/SubclassMappingRegistration.cs index 3feb6e8a19c..ed6ce68c527 100644 --- a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/SubclassMappingRegistration.cs +++ b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/SubclassMappingRegistration.cs @@ -64,10 +64,10 @@ private void ModelIsWellFormed(HbmMapping hbmMapping) { var hbmClass = hbmMapping.SubClasses.Single(); Assert.That(hbmClass, Is.Not.Null); - Assert.That(hbmClass.extends, Is.StringContaining("MyClass")); + Assert.That(hbmClass.extends, Does.Contain("MyClass")); var hbmProperty = hbmClass.Properties.OfType().Single(); Assert.That(hbmProperty.name, Is.EqualTo("SomethingElse")); Assert.That(hbmProperty.length, Is.EqualTo("15")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/UnionSubclassMappingRegistrationTest.cs b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/UnionSubclassMappingRegistrationTest.cs index 770924a5fc6..a6543c415a4 100644 --- a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/UnionSubclassMappingRegistrationTest.cs +++ b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/ConformistMappingRegistrationTests/UnionSubclassMappingRegistrationTest.cs @@ -64,10 +64,10 @@ private void ModelIsWellFormed(HbmMapping hbmMapping) { var hbmClass = hbmMapping.UnionSubclasses.Single(); Assert.That(hbmClass, Is.Not.Null); - Assert.That(hbmClass.extends, Is.StringContaining("MyClass")); + Assert.That(hbmClass.extends, Does.Contain("MyClass")); var hbmProperty = hbmClass.Properties.OfType().Single(); Assert.That(hbmProperty.name, Is.EqualTo("SomethingElse")); Assert.That(hbmProperty.length, Is.EqualTo("15")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/DynamicComponentMappingTests.cs b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/DynamicComponentMappingTests.cs index 6000a8e0eaf..6b2c1749171 100644 --- a/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/DynamicComponentMappingTests.cs +++ b/src/NHibernate.Test/MappingByCode/ExplicitMappingTests/DynamicComponentMappingTests.cs @@ -73,11 +73,11 @@ public void WhenMapDynCompoAttributesThenMapAttributes() var hbmMapping = mapper.CompileMappingFor(new[] { typeof(Person) }); var hbmClass = hbmMapping.RootClasses[0]; var hbmDynamicComponent = hbmClass.Properties.OfType().SingleOrDefault(); - Assert.That(hbmDynamicComponent.access, Is.StringContaining("field")); + Assert.That(hbmDynamicComponent.access, Does.Contain("field")); Assert.That(hbmDynamicComponent.insert, Is.False); Assert.That(hbmDynamicComponent.update, Is.False); Assert.That(hbmDynamicComponent.optimisticlock, Is.False); Assert.That(hbmDynamicComponent.unique, Is.True); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/AnyMapperTest.cs b/src/NHibernate.Test/MappingByCode/MappersTests/AnyMapperTest.cs index fd96224e10a..ecdb94721af 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/AnyMapperTest.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/AnyMapperTest.cs @@ -259,8 +259,8 @@ public void AtCreationSetColumnsUsingMemberName() var hbmMapping = new HbmMapping(); var hbmAny = new HbmAny(); new AnyMapper(member, typeof(int), hbmAny, hbmMapping); - Assert.That(hbmAny.Columns.ElementAt(0).name, Is.StringContaining("MyReferenceClass")); - Assert.That(hbmAny.Columns.ElementAt(1).name, Is.StringContaining("MyReferenceClass")); + Assert.That(hbmAny.Columns.ElementAt(0).name, Does.Contain("MyReferenceClass")); + Assert.That(hbmAny.Columns.ElementAt(1).name, Does.Contain("MyReferenceClass")); } [Test] @@ -298,4 +298,4 @@ public void CanSetInsert() Assert.That(hbmAny.insert, Is.False); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/ComponetAsIdTests.cs b/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/ComponetAsIdTests.cs index ded217fd333..b5836feec68 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/ComponetAsIdTests.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/ComponetAsIdTests.cs @@ -68,7 +68,7 @@ public void WhenComponentIdCustomizedMoreThanOnceThenMerge() Assert.That(hbmClass.Id, Is.Null); var hbmCompositeId = hbmClass.CompositeId; Assert.That(hbmCompositeId.Items, Has.Length.EqualTo(2)); - Assert.That(hbmCompositeId.access, Is.StringContaining("field")); + Assert.That(hbmCompositeId.access, Does.Contain("field")); } [Test] @@ -81,4 +81,4 @@ public void WhenMapExternalMemberAsComponentIdThenThrows() } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/SetPersisterTests.cs b/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/SetPersisterTests.cs index 12ec1cfc7c9..c29269b6928 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/SetPersisterTests.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/ClassMapperTests/SetPersisterTests.cs @@ -18,7 +18,7 @@ public void CanSetPersister() var mapdoc = new HbmMapping(); var rc = new ClassMapper(typeof(EntitySimple), mapdoc, For.Property(x => x.Id)); rc.Persister(); - Assert.That(mapdoc.RootClasses[0].Persister, Is.StringContaining("SingleTableEntityPersister")); + Assert.That(mapdoc.RootClasses[0].Persister, Does.Contain("SingleTableEntityPersister")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/CollectionIdMapperTests.cs b/src/NHibernate.Test/MappingByCode/MappersTests/CollectionIdMapperTests.cs index 194e53d611a..ec3a5e96900 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/CollectionIdMapperTests.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/CollectionIdMapperTests.cs @@ -26,7 +26,7 @@ public void WhenSetGeneratorThenChangeType() new CollectionIdMapper(hbmId).Generator(Generators.HighLow); Assert.That(hbmId.generator.@class, Is.EqualTo("hilo")); - Assert.That(hbmId.type.ToLowerInvariant(), Is.StringContaining("int")); + Assert.That(hbmId.type.ToLowerInvariant(), Does.Contain("int")); } [Test] @@ -118,4 +118,4 @@ public void CanSetLength() Assert.That(hbmId.length, Is.EqualTo("10")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/ComponentAsIdTests.cs b/src/NHibernate.Test/MappingByCode/MappersTests/ComponentAsIdTests.cs index c1782cff411..727799fa2cd 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/ComponentAsIdTests.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/ComponentAsIdTests.cs @@ -32,7 +32,7 @@ public void WhenCreatedThenSetTheComponentClass() var component = new HbmCompositeId(); new ComponentAsIdMapper(typeof(PersonId), For.Property(x=> x.Id), component, mapdoc); - Assert.That(component.@class, Is.StringContaining("PersonId")); + Assert.That(component.@class, Does.Contain("PersonId")); } [Test] @@ -89,4 +89,4 @@ public void CallMapManyToOneMapper() Assert.That(called, Is.True); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/IdBagMapperTest.cs b/src/NHibernate.Test/MappingByCode/MappersTests/IdBagMapperTest.cs index ce2e90c324a..4809d0496dc 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/IdBagMapperTest.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/IdBagMapperTest.cs @@ -130,7 +130,7 @@ public void SetCollectionTypeByGenericType() var hbm = new HbmIdbag(); var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm); mapper.Type(); - Assert.That(hbm.CollectionType, Is.StringContaining("FakeUserCollectionType")); + Assert.That(hbm.CollectionType, Does.Contain("FakeUserCollectionType")); } [Test] @@ -139,7 +139,7 @@ public void SetCollectionTypeByType() var hbm = new HbmIdbag(); var mapper = new IdBagMapper(typeof(Animal), typeof(Animal), hbm); mapper.Type(typeof(FakeUserCollectionType)); - Assert.That(hbm.CollectionType, Is.StringContaining("FakeUserCollectionType")); + Assert.That(hbm.CollectionType, Does.Contain("FakeUserCollectionType")); } [Test] @@ -240,4 +240,4 @@ public void SetFetchMode() Assert.That(hbm.fetchSpecified, Is.False); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/JoinedSubclassMapperTests/SetPersisterTests.cs b/src/NHibernate.Test/MappingByCode/MappersTests/JoinedSubclassMapperTests/SetPersisterTests.cs index 344f5f13e48..69fadadc25b 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/JoinedSubclassMapperTests/SetPersisterTests.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/JoinedSubclassMapperTests/SetPersisterTests.cs @@ -22,7 +22,7 @@ public void CanSetPersister() var mapdoc = new HbmMapping(); var rc = new JoinedSubclassMapper(typeof(InheritedSimple), mapdoc); rc.Persister(); - Assert.That(mapdoc.JoinedSubclasses[0].Persister, Is.StringContaining("JoinedSubclassEntityPersister")); + Assert.That(mapdoc.JoinedSubclasses[0].Persister, Does.Contain("JoinedSubclassEntityPersister")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/ManyToOneMapperTest.cs b/src/NHibernate.Test/MappingByCode/MappersTests/ManyToOneMapperTest.cs index e5e787dbbd5..bdd5248ed89 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/ManyToOneMapperTest.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/ManyToOneMapperTest.cs @@ -244,7 +244,7 @@ public void CanForceClassRelation() mapper.Class(typeof(Relation)); - Assert.That(mapping.Class, Is.StringContaining("Relation").And.Not.Contains("IRelation")); + Assert.That(mapping.Class, Does.Contain("Relation").And.Not.Contains("IRelation")); } [Test] @@ -346,4 +346,4 @@ public void CanSetNotFoundWithIgnoreMode() Assert.That(hbm.notfound, Is.EqualTo(HbmNotFoundMode.Ignore)); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/PropertyMapperTest.cs b/src/NHibernate.Test/MappingByCode/MappersTests/PropertyMapperTest.cs index 778528ba1e8..e3ed757d5d7 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/PropertyMapperTest.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/PropertyMapperTest.cs @@ -81,7 +81,7 @@ public void WhenSetTypeByIUserTypeThenSetTypeName() var mapper = new PropertyMapper(member, mapping); mapper.Type(); - Assert.That(mapping.Type.name, Is.StringContaining("MyType")); + Assert.That(mapping.Type.name, Does.Contain("MyType")); Assert.That(mapping.type, Is.Null); } @@ -93,7 +93,7 @@ public void WhenSetTypeByICompositeUserTypeThenSetTypeName() var mapper = new PropertyMapper(member, mapping); mapper.Type(); - Assert.That(mapping.Type.name, Is.StringContaining("MyCompoType")); + Assert.That(mapping.Type.name, Does.Contain("MyCompoType")); Assert.That(mapping.type, Is.Null); } @@ -106,7 +106,7 @@ public void WhenSetTypeByIUserTypeWithParamsThenSetType() mapper.Type(new { Param1 = "a", Param2 = 12 }); Assert.That(mapping.type1, Is.Null); - Assert.That(mapping.Type.name, Is.StringContaining("MyType")); + Assert.That(mapping.Type.name, Does.Contain("MyType")); Assert.That(mapping.Type.param, Has.Length.EqualTo(2)); Assert.That(mapping.Type.param.Select(p => p.name), Is.EquivalentTo(new [] {"Param1", "Param2"})); Assert.That(mapping.Type.param.Select(p => p.GetText()), Is.EquivalentTo(new [] {"a", "12"})); @@ -120,7 +120,7 @@ public void WhenSetTypeByIUserTypeWithNullParamsThenSetTypeName() var mapper = new PropertyMapper(member, mapping); mapper.Type(null); - Assert.That(mapping.Type.name, Is.StringContaining("MyType")); + Assert.That(mapping.Type.name, Does.Contain("MyType")); Assert.That(mapping.type, Is.Null); } @@ -132,7 +132,7 @@ public void WhenSetTypeByITypeTypeThenSetType() var mapper = new PropertyMapper(member, mapping); mapper.Type>(); - Assert.That(mapping.Type.name, Is.StringContaining(typeof(EnumStringType).FullName)); + Assert.That(mapping.Type.name, Does.Contain(typeof(EnumStringType).FullName)); Assert.That(mapping.type, Is.Null); } @@ -454,4 +454,4 @@ public bool IsMutable get { throw new NotImplementedException(); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/SubclassMapperTests/SetPersisterTests.cs b/src/NHibernate.Test/MappingByCode/MappersTests/SubclassMapperTests/SetPersisterTests.cs index c8ae6f623ed..a2cb72fd254 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/SubclassMapperTests/SetPersisterTests.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/SubclassMapperTests/SetPersisterTests.cs @@ -22,7 +22,7 @@ public void CanSetPersister() var mapdoc = new HbmMapping(); var rc = new SubclassMapper(typeof(HineritedSimple), mapdoc); rc.Persister(); - Assert.That(mapdoc.SubClasses[0].Persister, Is.StringContaining("SingleTableEntityPersister")); + Assert.That(mapdoc.SubClasses[0].Persister, Does.Contain("SingleTableEntityPersister")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/MappersTests/UnionSubclassMapperTests/SetPersisterTests.cs b/src/NHibernate.Test/MappingByCode/MappersTests/UnionSubclassMapperTests/SetPersisterTests.cs index 3fb028a1921..cb08bd21cd0 100644 --- a/src/NHibernate.Test/MappingByCode/MappersTests/UnionSubclassMapperTests/SetPersisterTests.cs +++ b/src/NHibernate.Test/MappingByCode/MappersTests/UnionSubclassMapperTests/SetPersisterTests.cs @@ -22,7 +22,7 @@ public void CanSetPersister() var mapdoc = new HbmMapping(); var rc = new UnionSubclassMapper(typeof(InheritedSimple), mapdoc); rc.Persister(); - Assert.That(mapdoc.UnionSubclasses[0].Persister, Is.StringContaining("UnionSubclassEntityPersister")); + Assert.That(mapdoc.UnionSubclasses[0].Persister, Does.Contain("UnionSubclassEntityPersister")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingByCode/TypeNameUtilTests.cs b/src/NHibernate.Test/MappingByCode/TypeNameUtilTests.cs index bd516a10729..a4e3d85d20d 100644 --- a/src/NHibernate.Test/MappingByCode/TypeNameUtilTests.cs +++ b/src/NHibernate.Test/MappingByCode/TypeNameUtilTests.cs @@ -77,7 +77,7 @@ public void WhenMatchNamespaceButNotAssemblyThenOnlyNameAndAssembly() var mapDoc = new HbmMapping(); mapDoc.assembly = "whatever"; mapDoc.@namespace = typeof(MyEntity).Namespace; - Assert.That(typeof(MyEntity).GetShortClassName(mapDoc), Is.StringStarting(typeof(MyEntity).Name).And.EndsWith(", " + typeof(MyEntity).Assembly.GetName().Name)); + Assert.That(typeof(MyEntity).GetShortClassName(mapDoc), Does.StartWith(typeof(MyEntity).Name).And.EndsWith(", " + typeof(MyEntity).Assembly.GetName().Name)); } [Test] @@ -134,7 +134,7 @@ public void WithGenericWhenMatchNamespaceButNotAssemblyThenOnlyNameAndAssembly() var mapDoc = new HbmMapping(); mapDoc.assembly = "whatever"; mapDoc.@namespace = typeof(MyGenericEntity<>).Namespace; - Assert.That(typeof(MyGenericEntity).GetShortClassName(mapDoc), Is.StringStarting(typeof(MyGenericEntity).FullName).And.EndsWith(", " + typeof(MyGenericEntity).Assembly.GetName().Name)); + Assert.That(typeof(MyGenericEntity).GetShortClassName(mapDoc), Does.StartWith(typeof(MyGenericEntity).FullName).And.EndsWith(", " + typeof(MyGenericEntity).Assembly.GetName().Name)); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/MappingTest/NonReflectiveBinderFixture.cs b/src/NHibernate.Test/MappingTest/NonReflectiveBinderFixture.cs index 63f5698f3b3..fbe047c53c5 100644 --- a/src/NHibernate.Test/MappingTest/NonReflectiveBinderFixture.cs +++ b/src/NHibernate.Test/MappingTest/NonReflectiveBinderFixture.cs @@ -16,7 +16,7 @@ public class NonReflectiveBinderFixture private Configuration cfg; - [TestFixtureSetUp] + [OneTimeSetUp] public void SetUp() { cfg = new Configuration() @@ -24,7 +24,7 @@ public void SetUp() cfg.BuildMappings(); } - [TestFixtureTearDown] + [OneTimeTearDown] public void TearDown() { cfg = null; @@ -164,7 +164,7 @@ public void Comparator() Property property = cm.GetProperty("SortedEmployee"); var col = (Mapping.Collection)property.Value; - Assert.That(col.ComparerClassName, Is.StringStarting("NHibernate.Test.MappingTest.NonExistingComparator")); + Assert.That(col.ComparerClassName, Does.StartWith("NHibernate.Test.MappingTest.NonExistingComparator")); } [Test] @@ -195,4 +195,4 @@ public void XmlSerialization() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/Futures/FutureQueryFixture.cs b/src/NHibernate.Test/NHSpecificTest/Futures/FutureQueryFixture.cs index e1e9e335bcf..fae07d67097 100644 --- a/src/NHibernate.Test/NHSpecificTest/Futures/FutureQueryFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/Futures/FutureQueryFixture.cs @@ -140,7 +140,7 @@ public void CanExecuteMultipleQueryWithSameParameterName() string paramPrefix = ((DriverBase) Sfi.ConnectionProvider.Driver).NamedPrefix; Assert.That( wholeLog, - Is.StringContaining(paramPrefix + "p0 = 1 [Type: Int32 (0:0:0)], " + paramPrefix + "p1 = 2 [Type: Int32 (0:0:0)]")); + Does.Contain(paramPrefix + "p0 = 1 [Type: Int32 (0:0:0)], " + paramPrefix + "p1 = 2 [Type: Int32 (0:0:0)]")); } } } diff --git a/src/NHibernate.Test/NHSpecificTest/Futures/LinqFutureFixture.cs b/src/NHibernate.Test/NHSpecificTest/Futures/LinqFutureFixture.cs index c349188ec28..665b43c42f9 100644 --- a/src/NHibernate.Test/NHSpecificTest/Futures/LinqFutureFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/Futures/LinqFutureFixture.cs @@ -355,7 +355,7 @@ public void CanExecuteMultipleQueriesOnSameExpression() string paramPrefix = ((DriverBase)Sfi.ConnectionProvider.Driver).NamedPrefix; Assert.That( wholeLog, - Is.StringContaining(paramPrefix + "p0 = 1 [Type: Int32 (0:0:0)], " + paramPrefix + "p1 = 2 [Type: Int32 (0:0:0)]")); + Does.Contain(paramPrefix + "p0 = 1 [Type: Int32 (0:0:0)], " + paramPrefix + "p1 = 2 [Type: Int32 (0:0:0)]")); } } } diff --git a/src/NHibernate.Test/NHSpecificTest/NH1069/ImproveLazyExceptionFixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1069/ImproveLazyExceptionFixture.cs index c732d0cf108..0c026206fde 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1069/ImproveLazyExceptionFixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1069/ImproveLazyExceptionFixture.cs @@ -26,8 +26,8 @@ public void LazyEntity() var ex = Assert.Throws(() => n= le.Name); Assert.That(ex.EntityName, Is.EqualTo(typeof (LazyE).FullName)); Assert.That(ex.EntityId, Is.EqualTo(1)); - Assert.That(ex.Message, Is.StringContaining(typeof(LazyE).FullName)); - Assert.That(ex.Message, Is.StringContaining("#1")); + Assert.That(ex.Message, Does.Contain(typeof(LazyE).FullName)); + Assert.That(ex.Message, Does.Contain("#1")); Console.WriteLine(ex.Message); using (ISession s = OpenSession()) @@ -57,9 +57,9 @@ public void LazyCollection() var ex = Assert.Throws(() => le.LazyC.GetEnumerator()); Assert.That(ex.EntityName, Is.EqualTo(typeof(LazyE).FullName)); Assert.That(ex.EntityId, Is.EqualTo(1)); - Assert.That(ex.Message, Is.StringContaining(typeof(LazyE).FullName)); - Assert.That(ex.Message, Is.StringContaining("#1")); - Assert.That(ex.Message, Is.StringContaining(typeof(LazyE).FullName + ".LazyC")); + Assert.That(ex.Message, Does.Contain(typeof(LazyE).FullName)); + Assert.That(ex.Message, Does.Contain("#1")); + Assert.That(ex.Message, Does.Contain(typeof(LazyE).FullName + ".LazyC")); using (ISession s = OpenSession()) using (ITransaction t = s.BeginTransaction()) @@ -69,4 +69,4 @@ public void LazyCollection() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1093/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1093/Fixture.cs index 1a1c1477d16..ab5cae9df6a 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1093/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1093/Fixture.cs @@ -86,8 +86,8 @@ protected override void BuildSessionFactory() using (var ls = new LogSpy(LogManager.GetLogger("NHibernate"), Level.Warn)) { base.BuildSessionFactory(); - Assert.That(ls.GetWholeLog(), Is.StringContaining("Fake cache used")); + Assert.That(ls.GetWholeLog(), Does.Contain("Fake cache used")); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1171/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1171/Fixture.cs index 51a4a2cdc38..b164b2967eb 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1171/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1171/Fixture.cs @@ -59,9 +59,9 @@ ORDER BY Name q.List(); } string message = ls.GetWholeLog(); - Assert.That(message, Is.StringContaining("-- Comment with ' number 1")); - Assert.That(message, Is.StringContaining("/* Comment with ' number 2 */")); + Assert.That(message, Does.Contain("-- Comment with ' number 1")); + Assert.That(message, Does.Contain("/* Comment with ' number 2 */")); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1182/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1182/Fixture.cs index 2ab67a9388c..4806ed12463 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1182/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1182/Fixture.cs @@ -31,8 +31,8 @@ public void DeleteWithoutUpdateVersion() t.Commit(); } string wholeLog = ls.GetWholeLog(); - Assert.That(wholeLog, Is.Not.StringContaining("UPDATE ObjectA")); - Assert.That(wholeLog, Is.StringContaining("UPDATE ObjectB"),"should create orphans"); + Assert.That(wholeLog, Does.Not.Contain("UPDATE ObjectA")); + Assert.That(wholeLog, Does.Contain("UPDATE ObjectB"),"should create orphans"); } using (ISession s = OpenSession()) @@ -44,4 +44,4 @@ public void DeleteWithoutUpdateVersion() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1270/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1270/Fixture.cs index c292ee70316..764ef4510ce 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1270/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1270/Fixture.cs @@ -54,8 +54,8 @@ public void WhenMapCustomFkNamesThenUseIt() var sb = new StringBuilder(); (new SchemaExport(conf)).Create(s => sb.AppendLine(s), true); - Assert.That(sb.ToString(), Is.StringContaining("FK_RoleInUser").And.StringContaining("FK_UserInRole")); + Assert.That(sb.ToString(), Does.Contain("FK_RoleInUser").And.Contains("FK_UserInRole")); (new SchemaExport(conf)).Drop(false, true); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1443/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1443/Fixture.cs index 7075f041ef6..a22d8a88d33 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1443/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1443/Fixture.cs @@ -17,11 +17,11 @@ private static void Bug(Configuration cfg) if (Dialect.Dialect.GetDialect(cfg.Properties).SupportsIfExistsBeforeTableName) - Assert.That(script, Is.StringMatching("drop table if exists nhibernate.dbo.Aclass")); + Assert.That(script, Does.Contain("drop table if exists nhibernate.dbo.Aclass")); else - Assert.That(script, Is.StringMatching("drop table nhibernate.dbo.Aclass")); + Assert.That(script, Does.Contain("drop table nhibernate.dbo.Aclass")); - Assert.That(script, Is.StringMatching("create table nhibernate.dbo.Aclass")); + Assert.That(script, Does.Contain("create table nhibernate.dbo.Aclass")); } @@ -66,4 +66,4 @@ public class Aclass { public int Id { get; set; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1444/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1444/Fixture.cs index 05abb2bde14..a257419c3cf 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1444/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1444/Fixture.cs @@ -24,9 +24,9 @@ public void Bug() .SetParameter("filterval", filter.HasValue ? filter.Value : 0).List(); var message = ls.GetWholeLog(); string paramPrefix = ((DriverBase) Sfi.ConnectionProvider.Driver).NamedPrefix; - Assert.That(message, Is.StringContaining("xchild0_.ParentId=xparent1_.Id and (" + paramPrefix + "p0=" + Dialect.ToBooleanValueString(true) + " or xparent1_.A<" + paramPrefix + "p1)")); + Assert.That(message, Does.Contain("xchild0_.ParentId=xparent1_.Id and (" + paramPrefix + "p0=" + Dialect.ToBooleanValueString(true) + " or xparent1_.A<" + paramPrefix + "p1)")); } } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs index 14278849219..a42b02aad54 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs @@ -59,9 +59,9 @@ public void GenerateSchemaMultipleUniqueKeys() var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); - Assert.That(script, Is.StringContaining("unique (A, C)")); - Assert.That(script, Is.StringContaining("unique (B, C)")); - Assert.That(script, Is.Not.StringContaining("unique (C)")); + Assert.That(script, Does.Contain("unique (A, C)")); + Assert.That(script, Does.Contain("unique (B, C)")); + Assert.That(script, Does.Not.Contain("unique (C)")); new SchemaExport(cfg).Drop(false, true); } @@ -93,8 +93,8 @@ public void GenerateSchemaMultipleIndex() var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); - Assert.That(script, Is.StringContaining("create index AC on Entity (A, C)")); - Assert.That(script, Is.StringContaining("create index BC on Entity (B, C)")); + Assert.That(script, Does.Contain("create index AC on Entity (A, C)")); + Assert.That(script, Does.Contain("create index BC on Entity (B, C)")); new SchemaExport(cfg).Drop(false, true); } @@ -132,8 +132,8 @@ public void GenerateSchemaMultipleIndexOnColumn() var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); - Assert.That(script, Is.StringContaining("create index AC on Entity (A, C)")); - Assert.That(script, Is.StringContaining("create index BC on Entity (B, C)")); + Assert.That(script, Does.Contain("create index AC on Entity (A, C)")); + Assert.That(script, Does.Contain("create index BC on Entity (B, C)")); new SchemaExport(cfg).Drop(false, true); } @@ -165,8 +165,8 @@ public void GenerateSchemaIndexOnId() var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); - Assert.That(script, Is.StringContaining("create index IdxId1 on Entity (Id)")); - Assert.That(script, Is.StringContaining("create index IdxId2 on Entity (Id)")); + Assert.That(script, Does.Contain("create index IdxId1 on Entity (Id)")); + Assert.That(script, Does.Contain("create index IdxId2 on Entity (Id)")); new SchemaExport(cfg).Drop(false, true); } @@ -211,4 +211,4 @@ public void GenerateSchemaUniqueOnId() } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1521/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1521/Fixture.cs index 3bb437911a6..2dc7cd0f2f4 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1521/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1521/Fixture.cs @@ -21,7 +21,7 @@ private static void AssertThatCheckOnTableExistenceIsCorrect(Configuration confi var sb = new StringBuilder(500); su.Execute(x => sb.AppendLine(x), false, false); string script = sb.ToString(); - Assert.That(script, Is.StringContaining("if exists (select * from dbo.sysobjects where id = object_id(N'nhibernate.dbo.Aclass') and OBJECTPROPERTY(id, N'IsUserTable') = 1)")); + Assert.That(script, Does.Contain("if exists (select * from dbo.sysobjects where id = object_id(N'nhibernate.dbo.Aclass') and OBJECTPROPERTY(id, N'IsUserTable') = 1)")); } [Test] @@ -69,4 +69,4 @@ public class Aclass { public int Id { get; set; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1593/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1593/Fixture.cs index ecf1078660e..daf6f8836be 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1593/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1593/Fixture.cs @@ -17,7 +17,7 @@ public void SchemaUpdateAddsIndexesThatWerentPresentYet() var su = new SchemaUpdate(cfg); var sb = new StringBuilder(500); su.Execute(x => sb.AppendLine(x), false); - Assert.That(sb.ToString(), Is.StringContaining("create index test_index_name on TestIndex (Name)")); + Assert.That(sb.ToString(), Does.Contain("create index test_index_name on TestIndex (Name)")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1635/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1635/Fixture.cs index dfafc5df3b5..ca8c414acff 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1635/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1635/Fixture.cs @@ -45,7 +45,7 @@ protected override void CreateSchema() { var script = new StringBuilder(); new SchemaExport(cfg).Create(sl=> script.Append(sl) , true); - Assert.That(script.ToString(), Is.Not.StringContaining("LatestMessage")); + Assert.That(script.ToString(), Does.Not.Contain("LatestMessage")); } [Test] @@ -64,4 +64,4 @@ public void Test() CleanUp(); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1710/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1710/Fixture.cs index e8db4477a2d..955164dbf98 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1710/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1710/Fixture.cs @@ -18,7 +18,7 @@ public abstract class BaseFixture protected ISessionFactoryImplementor factory; private string expectedExportString; - [TestFixtureSetUp] + [OneTimeSetUp] public void Config() { cfg = new Configuration(); @@ -37,7 +37,7 @@ public void NotIgnorePrecisionScaleInSchemaExport() { var script = new StringBuilder(); new SchemaExport(cfg).Create(sl => script.AppendLine(sl), true); - Assert.That(script.ToString(), Is.StringContaining(expectedExportString)); + Assert.That(script.ToString(), Does.Contain(expectedExportString)); new SchemaExport(cfg).Drop(false, true); } @@ -89,4 +89,4 @@ protected override string GetResourceName() return "WithColumnNode.hbm.xml"; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1760/SampleTest.cs b/src/NHibernate.Test/NHSpecificTest/NH1760/SampleTest.cs index ef6dc1cefbf..be74adb2858 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1760/SampleTest.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1760/SampleTest.cs @@ -71,7 +71,7 @@ public void TheJoinShouldBeOptional() { ICriteria c = session.CreateCriteria(typeof(TestClass)); IList retvalue = c.List(); - Assert.That(ls.GetWholeLog(), Is.Not.StringContaining("join")); + Assert.That(ls.GetWholeLog(), Does.Not.Contain("join")); criteriaCount = retvalue.Count; } } @@ -80,4 +80,4 @@ public void TheJoinShouldBeOptional() Cleanup(); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH1813/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH1813/Fixture.cs index 6e6fdabbba3..2a8526b2c77 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH1813/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH1813/Fixture.cs @@ -26,8 +26,8 @@ public void ContainSQLInInsert() { s.Save(new EntityWithUnique { Id = 2, Description = "algo" }); var exception = Assert.Throws(t.Commit); - Assert.That(exception.Message, Is.StringContaining("INSERT"), "should contain SQL"); - Assert.That(exception.Message, Is.StringContaining("#2"), "should contain id"); + Assert.That(exception.Message, Does.Contain("INSERT"), "should contain SQL"); + Assert.That(exception.Message, Does.Contain("#2"), "should contain id"); } using (ISession s = OpenSession()) using (ITransaction t = s.BeginTransaction()) @@ -53,7 +53,7 @@ public void ContainSQLInUpdate() var e = s.Get(2); e.Description = "algo"; var exception = Assert.Throws(t.Commit); - Assert.That(exception.Message, Is.StringContaining("UPDATE"), "should contain SQL"); + Assert.That(exception.Message, Does.Contain("UPDATE"), "should contain SQL"); } using (ISession s = OpenSession()) using (ITransaction t = s.BeginTransaction()) @@ -63,4 +63,4 @@ public void ContainSQLInUpdate() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2003/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2003/Fixture.cs index eb856650138..afb31e0d624 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2003/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2003/Fixture.cs @@ -24,7 +24,7 @@ public void ShouldCreateNotNullIdColumn() new SchemaExport(cfg).Execute(s => script.AppendLine(s), false, false); string wholeScript = script.ToString(); - Assert.That(wholeScript, Is.StringContaining("not null").IgnoreCase); + Assert.That(wholeScript, Does.Contain("not null").IgnoreCase); } } } diff --git a/src/NHibernate.Test/NHSpecificTest/NH2031/HqlModFuctionForMsSqlTest.cs b/src/NHibernate.Test/NHSpecificTest/NH2031/HqlModFuctionForMsSqlTest.cs index a1503812f03..7f4839c4a04 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2031/HqlModFuctionForMsSqlTest.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2031/HqlModFuctionForMsSqlTest.cs @@ -21,7 +21,7 @@ public void TheModuleOperationShouldAddParenthesisToAvoidWrongSentence() { // The expected value should be "(5+1)%(1+1)" instead "5+ 1%1 +1" var sqlQuery = GetSql("select mod(5+1,1+1) from MyClass"); - Assert.That(sqlQuery, Is.StringContaining("(5+1)").And.StringContaining("(1+1)")); + Assert.That(sqlQuery, Does.Contain("(5+1)").And.Contains("(1+1)")); } public string GetSql(string query) @@ -31,4 +31,4 @@ public string GetSql(string query) return qt.SQLString; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2094/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2094/Fixture.cs index b377311c180..0af3ce33250 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2094/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2094/Fixture.cs @@ -100,7 +100,7 @@ public void WhenAccessLazyPropertiesOutsideOfSessionThenThrows() string lazyField; var lazyException = Assert.Throws(() => lazyField = person.LazyField); Assert.That(lazyException.EntityName, Is.Not.Null); - Assert.That(lazyException.Message, Is.StringContaining("LazyField")); + Assert.That(lazyException.Message, Does.Contain("LazyField")); } finally { diff --git a/src/NHibernate.Test/NHSpecificTest/NH2243/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2243/Fixture.cs index 9867d070baa..44b78f0ec6c 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2243/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2243/Fixture.cs @@ -20,7 +20,7 @@ public void ShouldCreateSchemaWithDefaultClause() cfg.AddInputStream(stream); new SchemaExport(cfg).Execute(s => script.AppendLine(s), false, false); - Assert.That(script.ToString(), Is.StringContaining("MyNameForFK")); + Assert.That(script.ToString(), Does.Contain("MyNameForFK")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2266/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2266/Fixture.cs index e3928fc8aa3..5ae7e156cd6 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2266/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2266/Fixture.cs @@ -12,8 +12,8 @@ public void WhenBuildSessionFactoryThenThrows() Configuration cfg = TestConfigurationHelper.GetDefaultConfiguration(); cfg.AddResource("NHibernate.Test.NHSpecificTest.NH2266.Mappings.hbm.xml", GetType().Assembly); Assert.That(() => cfg.BuildSessionFactory(), Throws.TypeOf() - .And.Message.ContainsSubstring("does not have mapped subclasses") - .And.Message.ContainsSubstring(typeof (TemporaryToken).FullName)); + .And.Message.Contains("does not have mapped subclasses") + .And.Message.Contains(typeof (TemporaryToken).FullName)); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2278/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2278/Fixture.cs index 112b195708c..60c974d5daf 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2278/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2278/Fixture.cs @@ -33,15 +33,15 @@ public void CustomIdBag() s.Close(); Assert.That(a.Id, Is.Not.Null); - Assert.That(a.Items[0], Is.StringMatching("first string")); + Assert.That(a.Items[0], Is.EqualTo("first string")); s = OpenSession(); a = s.Load(a.Id); Assert.That(a.Items, Is.InstanceOf>()); - Assert.That(a.Items[0], Is.StringMatching("first string"), "first item should be 'first string'"); - Assert.That(a.Items[1], Is.StringMatching("second string"), "second item should be 'second string'"); + Assert.That(a.Items[0], Is.EqualTo("first string"), "first item should be 'first string'"); + Assert.That(a.Items[1], Is.EqualTo("second string"), "second item should be 'second string'"); // ensuring the correct generic type was constructed a.Items.Add("third string"); @@ -52,4 +52,4 @@ public void CustomIdBag() s.Close(); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2288/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2288/Fixture.cs index 7bb512a4203..67997f0ce74 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2288/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2288/Fixture.cs @@ -21,7 +21,7 @@ private static void AssertThatCheckOnTableExistenceIsCorrect(Configuration confi var sb = new StringBuilder(500); su.Execute(x => sb.AppendLine(x), false, false); string script = sb.ToString(); - Assert.That(script, Is.StringContaining("if exists (select 1 from sys.objects where object_id = OBJECT_ID(N'dbo.[Aclasses_Id_FK]') AND parent_object_id = OBJECT_ID('dbo.Aclass'))")); + Assert.That(script, Does.Contain("if exists (select 1 from sys.objects where object_id = OBJECT_ID(N'dbo.[Aclasses_Id_FK]') AND parent_object_id = OBJECT_ID('dbo.Aclass'))")); } [Test] @@ -79,4 +79,4 @@ public class Bclass public int Id { get; set; } public ICollection Aclasses { get; set; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2313/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2313/Fixture.cs index 363ff898e67..ffc145ebb3a 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2313/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2313/Fixture.cs @@ -11,7 +11,7 @@ public void WhenLoadWorngMappingThenMessageShouldContaingWrongClassName() Configuration cfg = TestConfigurationHelper.GetDefaultConfiguration(); cfg.AddResource("NHibernate.Test.NHSpecificTest.NH2313.Mappings.hbm.xml", GetType().Assembly); Assert.That(() => cfg.BuildSessionFactory(), Throws.TypeOf() - .And.Message.ContainsSubstring("TheOther")); + .And.Message.Contains("TheOther")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2420/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2420/Fixture.cs index fe575df876b..706c92aba5b 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2420/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2420/Fixture.cs @@ -31,16 +31,16 @@ private string FetchConnectionStringFromConfiguration() string connectionString; if (cfg.Properties.TryGetValue(Environment.ConnectionString, out connectionString)) { - Assert.IsNotNullOrEmpty(connectionString); + Assert.That(connectionString, Is.Not.Null.Or.Empty); return connectionString; } string connectionStringName; if (cfg.Properties.TryGetValue(Environment.ConnectionStringName, out connectionStringName)) { var connectionStringSettings = ConfigurationManager.ConnectionStrings[connectionStringName]; - Assert.IsNotNull(connectionStringSettings); + Assert.That(connectionStringSettings, Is.Not.Null); connectionString = connectionStringSettings.ConnectionString; - Assert.IsNotNullOrEmpty(connectionString); + Assert.That(connectionString, Is.Not.Null.Or.Empty); return connectionString; } else @@ -104,4 +104,4 @@ protected override void OnTearDown() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs index 74e1b489144..dacbb114c4a 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2488/Fixture.cs @@ -126,7 +126,7 @@ public void ShouldNotQueryLazyProperties_FetchJoin() using (var ls = new SqlLogSpy()) { items = s.CreateQuery("from Base2").List(); - Assert.That(ls.GetWholeLog(), Is.Not.StringContaining("LongContent")); + Assert.That(ls.GetWholeLog(), Does.Not.Contain("LongContent")); } var item = (Derived2) items[0]; Assert.That(NHibernateUtil.IsPropertyInitialized(item, "LongContent"), Is.False); @@ -151,7 +151,7 @@ public void ShouldNotQueryLazyProperties_FetchSelect() using(var ls = new SqlLogSpy()) { items = s.CreateQuery("from Base1").List(); - Assert.That(ls.GetWholeLog(), Is.Not.StringContaining("LongContent")); + Assert.That(ls.GetWholeLog(), Does.Not.Contain("LongContent")); } var item = (Derived1) items[0]; Assert.That(NHibernateUtil.IsPropertyInitialized(item, "LongContent"), Is.False); @@ -176,7 +176,7 @@ public void ShouldNotQueryLazyProperties_Joinedsubclass() using (var ls = new SqlLogSpy()) { items = s.CreateQuery("from Base3").List(); - Assert.That(ls.GetWholeLog(), Is.Not.StringContaining("LongContent")); + Assert.That(ls.GetWholeLog(), Does.Not.Contain("LongContent")); } var item = (Derived3)items[0]; Assert.That(NHibernateUtil.IsPropertyInitialized(item, "LongContent"), Is.False); @@ -188,4 +188,4 @@ public void ShouldNotQueryLazyProperties_Joinedsubclass() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2530/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2530/Fixture.cs index 28bb7f0d46d..70a8e4ce148 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2530/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2530/Fixture.cs @@ -46,8 +46,8 @@ public void WhenTryToGetHighThenExceptionShouldContainWhereClause() using (var tx = session.BeginTransaction()) { var customer = new Customer { Name = "Mengano" }; - Assert.That(() => session.Persist(customer), Throws.Exception.Message.ContainsSubstring("Entity = 'Customer'")); + Assert.That(() => session.Persist(customer), Throws.Exception.Message.Contains("Entity = 'Customer'")); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2554/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2554/Fixture.cs index 79425010e41..ac6114feb78 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2554/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2554/Fixture.cs @@ -49,7 +49,7 @@ public void TestMappedFormulasContainingSqlServerDataTypeKeywords() { var students = session.CreateQuery("from Student").List(); Assert.That(students.Count, Is.EqualTo(1)); - Assert.That(students[0].FullName, Is.StringMatching("Julian Maughan")); + Assert.That(students[0].FullName, Is.EqualTo("Julian Maughan")); Assert.That(students[0].FullNameAsVarBinary.Length, Is.EqualTo(28)); Assert.That(students[0].FullNameAsVarBinary512.Length, Is.EqualTo(28)); // Assert.That(students[0].FullNameAsBinary.Length, Is.EqualTo(28)); 30??? diff --git a/src/NHibernate.Test/NHSpecificTest/NH2580/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2580/Fixture.cs index cdd761ec201..b676002c9bc 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2580/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2580/Fixture.cs @@ -15,8 +15,8 @@ public void WhenPersisterNotFoundShouldThrowAMoreExplicitException() using (var s = OpenSession()) { var exeption = Assert.Throws(() => s.Get(1)); - Assert.That(exeption.Message.ToLowerInvariant(), Is.StringContaining("possible cause")); + Assert.That(exeption.Message.ToLowerInvariant(), Does.Contain("possible cause")); } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH2700/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2700/Fixture.cs index b12d68dcf99..ca6bc21cab2 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2700/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2700/Fixture.cs @@ -68,7 +68,7 @@ public void TestProjection() var sql = GetSql(criteria); - Assert.That(sql, Is.StringMatching("dateadd\\(day,(.*?)Value1,(.*?)Date1\\)")); + Assert.That(sql, Does.Match(@"dateadd\(day,(.*?)Value1,(.*?)Date1\)")); Console.WriteLine(sql.ToString()); } } diff --git a/src/NHibernate.Test/NHSpecificTest/NH2828/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2828/Fixture.cs index 32becb872dc..69aea993611 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2828/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2828/Fixture.cs @@ -29,7 +29,7 @@ public void WhenPersistShouldNotFetchUninitializedCollection() } } var wholeMessage = sl.GetWholeLog(); - Assert.That(wholeMessage, Is.Not.StringContaining("BankAccount")); + Assert.That(wholeMessage, Does.Not.Contain("BankAccount")); } Cleanup(companyId); diff --git a/src/NHibernate.Test/NHSpecificTest/NH2875/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH2875/Fixture.cs index d50514c42a3..688cc0565b6 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH2875/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH2875/Fixture.cs @@ -44,7 +44,7 @@ public void SpecifiedForeignKeyNameInByCodeMappingIsUsedInGeneratedSchema() cfg.AddMapping(mapper.CompileMappingForAllExplicitlyAddedEntities()); new SchemaExport(cfg).Execute(s => script.AppendLine(s), false, false); - Assert.That(script.ToString(), Is.StringContaining(string.Format("constraint {0}", ForeignKeyName))); + Assert.That(script.ToString(), Does.Contain(string.Format("constraint {0}", ForeignKeyName))); } } @@ -60,4 +60,4 @@ public class Employee public virtual int Id { get; set; } public virtual Person Person { get; set; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHSpecificTest/NH3121/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH3121/Fixture.cs index e0cf2920d22..16bb4da24f3 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH3121/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH3121/Fixture.cs @@ -40,7 +40,7 @@ public void ShouldThrowWhenByteArrayTooLong() var ex = Assert.Throws(() => PersistReport(report)); - Assert.That(ex.Message, Is.StringContaining("Report.UnsizedArray")); + Assert.That(ex.Message, Does.Contain("Report.UnsizedArray")); Assert.That(ex.InnerException, Is.TypeOf()); Assert.That(ex.InnerException.Message, Is.EqualTo("The length of the byte[] value exceeds the length configured in the mapping/parameter.")); @@ -58,7 +58,7 @@ public void ShouldThrowWhenImageTooLarge() var ex = Assert.Throws(() => PersistReport(report)); - Assert.That(ex.Message, Is.StringContaining("Report.Image")); + Assert.That(ex.Message, Does.Contain("Report.Image")); Assert.That(ex.InnerException, Is.TypeOf()); Assert.That(ex.InnerException.Message, Is.EqualTo("The length of the byte[] value exceeds the length configured in the mapping/parameter.")); @@ -76,7 +76,7 @@ public void ShouldThrowWhenImageAsISerializableTooLarge() var ex = Assert.Throws(() => PersistReport(report)); - Assert.That(ex.Message, Is.StringContaining("Report.SerializableImage")); + Assert.That(ex.Message, Does.Contain("Report.SerializableImage")); Assert.That(ex.InnerException, Is.TypeOf()); Assert.That(ex.InnerException.Message, Is.EqualTo("The length of the byte[] value exceeds the length configured in the mapping/parameter.")); diff --git a/src/NHibernate.Test/NHSpecificTest/NH480/Fixture.cs b/src/NHibernate.Test/NHSpecificTest/NH480/Fixture.cs index 7fde5932687..4e33fd4c565 100644 --- a/src/NHibernate.Test/NHSpecificTest/NH480/Fixture.cs +++ b/src/NHibernate.Test/NHSpecificTest/NH480/Fixture.cs @@ -25,7 +25,7 @@ public class Fixture private CultureInfo currentCulture = null; private CultureInfo currentUICulture = null; - [TestFixtureSetUp] + [OneTimeSetUp] public void TestFixtureSetUp() { currentCulture = Thread.CurrentThread.CurrentCulture; @@ -36,7 +36,7 @@ public void TestFixtureSetUp() Thread.CurrentThread.CurrentUICulture = turkish; } - [TestFixtureTearDown] + [OneTimeTearDown] public void TestFixtureTearDown() { Thread.CurrentThread.CurrentCulture = currentCulture; @@ -58,4 +58,4 @@ public void CheckIII() Assert.AreEqual("iii_iii_iii", ImprovedNamingStrategy.Instance.ColumnName("IiiIiiIii")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/NHibernate.Test.csproj b/src/NHibernate.Test/NHibernate.Test.csproj index bc33fb03f97..fe5dc1a8b12 100644 --- a/src/NHibernate.Test/NHibernate.Test.csproj +++ b/src/NHibernate.Test/NHibernate.Test.csproj @@ -79,8 +79,8 @@ ..\packages\log4net.2.0.7\lib\net45-full\log4net.dll True - - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll + + ..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll True diff --git a/src/NHibernate.Test/PolymorphicGetAndLoad/PolymorphicGetAndLoadTest.cs b/src/NHibernate.Test/PolymorphicGetAndLoad/PolymorphicGetAndLoadTest.cs index 916806f58f5..45ed992beeb 100644 --- a/src/NHibernate.Test/PolymorphicGetAndLoad/PolymorphicGetAndLoadTest.cs +++ b/src/NHibernate.Test/PolymorphicGetAndLoad/PolymorphicGetAndLoadTest.cs @@ -204,10 +204,10 @@ public void WhenLoadClassUsingInterfaceOfMultippleHierarchyThenThrows() using (var s = OpenSession()) { Assert.That(() => s.Load(1), Throws.TypeOf() - .And.Message.ContainsSubstring("Ambiguous") - .And.Message.ContainsSubstring("GraphA") - .And.Message.ContainsSubstring("GraphB") - .And.Message.ContainsSubstring("IMultiGraphNamed")); + .And.Message.Contains("Ambiguous") + .And.Message.Contains("GraphA") + .And.Message.Contains("GraphB") + .And.Message.Contains("IMultiGraphNamed")); } } @@ -218,10 +218,10 @@ public void WhenGetClassUsingInterfaceOfMultippleHierarchyThenThrows() { Assert.That(() => s.Get(1), Throws.TypeOf() - .And.Message.StringContaining("Ambiguous") - .And.Message.StringContaining("GraphA") - .And.Message.StringContaining("GraphB") - .And.Message.StringContaining("IMultiGraphNamed")); + .And.Message.Contains("Ambiguous") + .And.Message.Contains("GraphA") + .And.Message.Contains("GraphB") + .And.Message.Contains("IMultiGraphNamed")); } } @@ -253,4 +253,4 @@ public void WhenGetInheritedClassUsingInterfaceFromSessionCacheThenNotThrows() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/ProjectionFixtures/Fixture.cs b/src/NHibernate.Test/ProjectionFixtures/Fixture.cs index d172f732609..a46e880dfa6 100644 --- a/src/NHibernate.Test/ProjectionFixtures/Fixture.cs +++ b/src/NHibernate.Test/ProjectionFixtures/Fixture.cs @@ -102,7 +102,7 @@ public void ErrorFromDBWillGiveTheActualSQLExecuted() } }); - Assert.That(e.Message, Is.StringContaining(expectedMessagePart0).Or.StringContaining(expectedMessagePart1)); + Assert.That(e.Message, Does.Contain(expectedMessagePart0).Or.Contains(expectedMessagePart1)); } [Test] @@ -177,4 +177,4 @@ public void QueryingWithParemetersAndParaemtersInOrderBy() } } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/ReadOnly/ReadOnlySessionTest.cs b/src/NHibernate.Test/ReadOnly/ReadOnlySessionTest.cs index c1ad9a651ec..ff7ee45a204 100644 --- a/src/NHibernate.Test/ReadOnly/ReadOnlySessionTest.cs +++ b/src/NHibernate.Test/ReadOnly/ReadOnlySessionTest.cs @@ -67,7 +67,7 @@ public void ReadOnlyOnProxies() Assert.That(NHibernateUtil.IsInitialized(dp), Is.False, "was initialized during isReadOnly"); dp.Description = "changed"; Assert.That(NHibernateUtil.IsInitialized(dp), Is.True, "was not initialized during mod"); - Assert.That(dp.Description, Is.StringMatching("changed"), "desc not changed in memory"); + Assert.That(dp.Description, Is.EqualTo("changed"), "desc not changed in memory"); s.Flush(); s.Transaction.Commit(); } diff --git a/src/NHibernate.Test/TestCase.cs b/src/NHibernate.Test/TestCase.cs index 3850e59c551..0d7c4742556 100644 --- a/src/NHibernate.Test/TestCase.cs +++ b/src/NHibernate.Test/TestCase.cs @@ -70,7 +70,7 @@ static TestCase() /// /// Creates the tables used in this TestCase /// - [TestFixtureSetUp] + [OneTimeSetUp] public void TestFixtureSetUp() { try @@ -113,7 +113,7 @@ public void TestFixtureSetUp() /// will occur if the TestCase does not have the same hbm.xml files /// included as a previous one. /// - [TestFixtureTearDown] + [OneTimeTearDown] public void TestFixtureTearDown() { // If TestFixtureSetup fails due to an IgnoreException, it will still run the teardown. diff --git a/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/AutoQuoteFixture.cs b/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/AutoQuoteFixture.cs index 9df608f7346..4182d7f5c4e 100644 --- a/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/AutoQuoteFixture.cs +++ b/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/AutoQuoteFixture.cs @@ -28,7 +28,7 @@ public void WhenCalledExplicitlyThenTakeInAccountHbm2DdlKeyWordsSetting() var script = new StringBuilder(); new SchemaExport(configuration).Execute(s=> script.AppendLine(s), false, false); - Assert.That(script.ToString(), Is.StringContaining("[Order]").And.Contains("[Select]").And.Contains("[From]").And.Contains("[And]")); + Assert.That(script.ToString(), Does.Contain("[Order]").And.Contains("[Select]").And.Contains("[From]").And.Contains("[And]")); } [Test] @@ -58,4 +58,4 @@ public void WhenUpdateCalledExplicitlyThenTakeInAccountHbm2DdlKeyWordsSetting() Assert.That(culs.First(c => "Column" == c.Name).IsQuoted, Is.True); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs b/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs index c1944160c8a..01b0b279f52 100644 --- a/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs +++ b/src/NHibernate.Test/Tools/hbm2ddl/SchemaExportTests/WithColumnTagFixture.cs @@ -22,8 +22,8 @@ public void ShouldCreateSchemaWithDefaultClause() new SchemaExport(cfg).Execute(s => script.AppendLine(s), false, false); string wholeScript = script.ToString(); - Assert.That(wholeScript, Is.StringContaining("default SYSTEM_USER")); - Assert.That(wholeScript, Is.StringContaining("default 77")); + Assert.That(wholeScript, Does.Contain("default SYSTEM_USER")); + Assert.That(wholeScript, Does.Contain("default 77")); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs b/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs index e0de73272c8..2d4dc5c92ef 100644 --- a/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs +++ b/src/NHibernate.Test/Tools/hbm2ddl/SchemaValidator/SchemaValidateFixture.cs @@ -62,7 +62,7 @@ public void ShouldNotVerifyModifiedTable() } catch (HibernateException e) { - Assert.That(e.Message, Is.StringStarting("Missing column: Name")); + Assert.That(e.Message, Does.StartWith("Missing column: Name")); } } @@ -74,4 +74,4 @@ private static Configuration BuildConfiguration(string resource) return cfg; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/TypesTest/StringTypeWithLengthFixture.cs b/src/NHibernate.Test/TypesTest/StringTypeWithLengthFixture.cs index dded40b8183..21cfd8b68d8 100644 --- a/src/NHibernate.Test/TypesTest/StringTypeWithLengthFixture.cs +++ b/src/NHibernate.Test/TypesTest/StringTypeWithLengthFixture.cs @@ -118,7 +118,7 @@ private void AssertFailedInsertExceptionDetailsAndEmptyTable(Exception ex) Assert.That( ex.Message, - Is.StringStarting("Error dehydrating property value for NHibernate.Test.TypesTest.StringClass.")); + Does.StartWith("Error dehydrating property value for NHibernate.Test.TypesTest.StringClass.")); Assert.That(ex.InnerException, Is.TypeOf()); @@ -128,7 +128,7 @@ private void AssertFailedInsertExceptionDetailsAndEmptyTable(Exception ex) } else if (Dialect is MsSqlCeDialect && ex is InvalidOperationException) { - Assert.That(ex.Message, Is.StringContaining("max=4000, len=4001")); + Assert.That(ex.Message, Does.Contain("max=4000, len=4001")); } else { diff --git a/src/NHibernate.Test/TypesTest/TypeSqlTypeFixture.cs b/src/NHibernate.Test/TypesTest/TypeSqlTypeFixture.cs index 1d9a534eed1..caa01e36486 100644 --- a/src/NHibernate.Test/TypesTest/TypeSqlTypeFixture.cs +++ b/src/NHibernate.Test/TypesTest/TypeSqlTypeFixture.cs @@ -25,7 +25,7 @@ public abstract class TypeSqlTypeFixture protected Configuration cfg; protected ISessionFactoryImplementor factory; - [TestFixtureSetUp] + [OneTimeSetUp] public void Config() { cfg = new Configuration(); @@ -141,4 +141,4 @@ protected override string GetResourceName() return "MultiTypeEntity_WithSqlType.hbm.xml"; } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/TypesTest/XDocTypeFixture.cs b/src/NHibernate.Test/TypesTest/XDocTypeFixture.cs index 7033df7f183..36bd03fd483 100644 --- a/src/NHibernate.Test/TypesTest/XDocTypeFixture.cs +++ b/src/NHibernate.Test/TypesTest/XDocTypeFixture.cs @@ -35,7 +35,7 @@ public void ReadWrite() var docEntity = s.Get(1); var document = docEntity.Document; Assert.That(document, Is.Not.Null); - Assert.That(document.Document.Root.ToString(SaveOptions.DisableFormatting), Is.StringContaining("my Text")); + Assert.That(document.Document.Root.ToString(SaveOptions.DisableFormatting), Does.Contain("my Text")); var xmlElement = new XElement("Pizza", new XAttribute("temp", "calda")); document.Document.Root.Add(xmlElement); s.Save(docEntity); @@ -45,7 +45,7 @@ public void ReadWrite() { var docEntity = s.Get(1); var document = docEntity.Document; - Assert.That(document.Document.Root.ToString(SaveOptions.DisableFormatting), Is.StringContaining("Pizza temp=\"calda\"")); + Assert.That(document.Document.Root.ToString(SaveOptions.DisableFormatting), Does.Contain("Pizza temp=\"calda\"")); s.Delete(docEntity); s.Flush(); } diff --git a/src/NHibernate.Test/TypesTest/XmlDocTypeFixture.cs b/src/NHibernate.Test/TypesTest/XmlDocTypeFixture.cs index 552097b702e..aadce4b7bc2 100644 --- a/src/NHibernate.Test/TypesTest/XmlDocTypeFixture.cs +++ b/src/NHibernate.Test/TypesTest/XmlDocTypeFixture.cs @@ -35,7 +35,7 @@ public void ReadWrite() var docEntity = s.Get(1); var document = docEntity.Document; Assert.That(document, Is.Not.Null); - Assert.That(document.OuterXml, Is.StringContaining("my Text")); + Assert.That(document.OuterXml, Does.Contain("my Text")); var xmlElement = document.CreateElement("Pizza"); xmlElement.SetAttribute("temp", "calda"); document.FirstChild.AppendChild(xmlElement); @@ -45,7 +45,7 @@ public void ReadWrite() using (var s = OpenSession()) { var docEntity = s.Get(1); - Assert.That(docEntity.Document.OuterXml, Is.StringContaining("Pizza temp=\"calda\"")); + Assert.That(docEntity.Document.OuterXml, Does.Contain("Pizza temp=\"calda\"")); s.Delete(docEntity); s.Flush(); } @@ -79,4 +79,4 @@ public void AutoDiscoverFromNetType() Assert.That(propertyType, Is.InstanceOf()); } } -} \ No newline at end of file +} diff --git a/src/NHibernate.Test/UtilityTest/BasicFormatterFixture.cs b/src/NHibernate.Test/UtilityTest/BasicFormatterFixture.cs index 8afd8c7efc8..a5dac5f1c1b 100644 --- a/src/NHibernate.Test/UtilityTest/BasicFormatterFixture.cs +++ b/src/NHibernate.Test/UtilityTest/BasicFormatterFixture.cs @@ -13,11 +13,11 @@ public void StringWithNestedDelimiters() IFormatter formatter = new BasicFormatter(); string sql = @"INSERT INTO Table (Name, id) VALUES (@p0, @p1); @p0 = 'a'(b', @p1 = 1"; Assert.DoesNotThrow(() => formattedSql = formatter.Format(sql)); - Assert.That(formattedSql, Is.StringContaining("'a'(b'")); + Assert.That(formattedSql, Does.Contain("'a'(b'")); sql = @"UPDATE Table SET Column = @p0;@p0 = '(')'"; Assert.DoesNotThrow(() => formattedSql = formatter.Format(sql)); - Assert.That(formattedSql, Is.StringContaining("'(')'")); + Assert.That(formattedSql, Does.Contain("'(')'")); } } } diff --git a/src/NHibernate.Test/packages.config b/src/NHibernate.Test/packages.config index 8f2a9a689c3..9966f2b2d76 100644 --- a/src/NHibernate.Test/packages.config +++ b/src/NHibernate.Test/packages.config @@ -3,7 +3,7 @@ - + \ No newline at end of file diff --git a/src/NHibernate.TestDatabaseSetup/AssemblyInfo.cs b/src/NHibernate.TestDatabaseSetup/AssemblyInfo.cs index 762c626efc4..74c6a805c88 100644 --- a/src/NHibernate.TestDatabaseSetup/AssemblyInfo.cs +++ b/src/NHibernate.TestDatabaseSetup/AssemblyInfo.cs @@ -1,6 +1,7 @@ using System; using System.Configuration; using System.Reflection; +using NUnit.Framework; [assembly: CLSCompliantAttribute(true)] [assembly: AssemblyTitleAttribute("NHibernate.TestDatabaseSetup")] @@ -10,3 +11,4 @@ [assembly: AssemblyCopyrightAttribute("Licensed under LGPL.")] [assembly: AssemblyDelaySignAttribute(false)] +[assembly: LevelOfParallelism(0)] \ No newline at end of file diff --git a/src/NHibernate.TestDatabaseSetup/NHibernate.TestDatabaseSetup.csproj b/src/NHibernate.TestDatabaseSetup/NHibernate.TestDatabaseSetup.csproj index b23360617a3..118e1b4ac07 100644 --- a/src/NHibernate.TestDatabaseSetup/NHibernate.TestDatabaseSetup.csproj +++ b/src/NHibernate.TestDatabaseSetup/NHibernate.TestDatabaseSetup.csproj @@ -66,8 +66,8 @@ ..\..\lib\teamcity\postgresql\Npgsql.dll - - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll + + ..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll True diff --git a/src/NHibernate.TestDatabaseSetup/packages.config b/src/NHibernate.TestDatabaseSetup/packages.config index 01c187ccb0b..1261b7bcffd 100644 --- a/src/NHibernate.TestDatabaseSetup/packages.config +++ b/src/NHibernate.TestDatabaseSetup/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/src/NHibernate.sln.DotSettings b/src/NHibernate.sln.DotSettings index 0bf3bfc0403..918ecb514b5 100644 --- a/src/NHibernate.sln.DotSettings +++ b/src/NHibernate.sln.DotSettings @@ -22,6 +22,7 @@ True True True + True True NUnit Assert.NotNull True diff --git a/teamcity.build b/teamcity.build index 42c321601b0..7d1c79552fa 100644 --- a/teamcity.build +++ b/teamcity.build @@ -12,17 +12,7 @@ - - - - - - - - - - - + @@ -81,6 +71,7 @@ + @@ -109,8 +100,7 @@ - - + @@ -136,6 +126,7 @@ + @@ -179,6 +170,7 @@ + @@ -210,6 +202,7 @@ +