# HG changeset patch # User stevenhollidge # Date 1336316968 -3600 # Node ID 572886951353b819d9400cfc1570207549db17fb # Parent 62477c2e8837a15af9a45e14382ba9dc7cecb0cf Working tests under StatLight diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/Libs/Castle.Core.dll Binary file SilverlightValidation/Libs/Castle.Core.dll has changed diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/Libs/FakeItEasy.dll Binary file SilverlightValidation/Libs/FakeItEasy.dll has changed diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/Libs/FakeItEasy.xml --- a/SilverlightValidation/Libs/FakeItEasy.xml Sun May 06 13:00:46 2012 +0100 +++ b/SilverlightValidation/Libs/FakeItEasy.xml Sun May 06 16:09:28 2012 +0100 @@ -134,6 +134,238 @@ The obj B. True if the objects are the same reference. + + + A collection of method arguments. + + + + + The arguments this collection contains. + + + + + Initializes a new instance of the class. + + The arguments. + The argument names. + + + + Initializes a new instance of the class. + + The arguments. + The method. + + + + Returns an enumerator that iterates through the collection or arguments. + + + A that can be used to iterate through the collection. + + + + + Gets the argument at the specified index. + + The type of the argument to get. + The index of the argument. + The argument at the specified index. + + + + Gets the argument with the specified name. + + The type of the argument to get. + The name of the argument. + The argument with the specified name. + + + + Gets an empty ArgumentList. + + + + + Gets the number of arguments in the list. + + + + + Gets the names of the arguments in the list. + + + + + Gets the argument at the specified index. + + The index of the argument to get. + The argument at the specified index. + + + + Provides validation extension to the Argumentscope{T} class. + + + + + Constrains an argument so that it must be null (Nothing in VB). + + The type of the argument. + The constraint manager to match the constraint. + A dummy argument value. + + + + Constrains the string argument to contain the specified text. + + The constraint manager to match the constraint. + The string the argument string should contain. + A dummy argument value. + + + + Constrains the sequence so that it must contain the specified value. + + The constraint manager to match the constraint. + The value the collection should contain. + The type of sequence. + A dummy argument value. + + + + Constrains the string so that it must start with the specified value. + + The constraint manager to match the constraint. + The value the string should start with. + A dummy argument value. + + + + Constrains the string so that it must be null or empty. + + The constraint manager to match the constraint. + A dummy argument value. + + + + Constrains argument value so that it must be greater than the specified value. + + The constraint manager to match the constraint. + The value the string should start with. + The type of argument to constrain. + A dummy argument value. + + + + The tested argument collection should contain the same elements as the + as the specified collection. + + The constraint manager to match the constraint. + The sequence to test against. + The type of argument to constrain. + A dummy argument value. + + + + Tests that the IEnumerable contains no items. + + The type of argument. + The constraint manager to match the constraint. + A dummy argument value. + + + + Tests that the passed in argument is equal to the specified value. + + The type of the argument. + The constraint manager to match the constraint. + The value to compare to. + A dummy argument value. + + + + Constrains the argument to be of the specified type. + + The type of argument in the method signature. + The constraint manager. + The type to constrain the argument with. + A dummy value. + + + + Constrains the argument with a predicate. + + + The constraint manager. + + + The predicate that should constrain the argument. + + + A human readable description of the constraint. + + + The type of argument in the method signature. + + + A dummy argument value. + + + + + Constrains the argument with a predicate. + + + The constraint manager. + + + The predicate that should constrain the argument. + + + A human readable description of the constraint format string. + + + Arguments for the format string. + + + The type of argument in the method signature. + + + A dummy argument value. + + + + + Constrains the argument with a predicate. + + + The constraint manager. + + + The predicate that should constrain the argument. + + + The type of argument in the method signature. + + + A dummy argument value. + + + + + Constrains the argument to be not null (Nothing in VB) and to match + the specified predicate. + + The type of the argument to constrain. + The constraint manager. + The predicate that constrains non null values. + An action that writes a description of the constraint + to the output. + A dummy argument value. + Provides string formatting for arguments of type T when written in @@ -193,6 +425,53 @@ + + + Provides extension methods for the common uses. + + + + + Replaces the format item in a specified System.String with the text equivalent + of the value of a corresponding System.Object instance in a specified array using + invariant culture as . + + A composite format string. + An array containing zero or more objects to format. + The formatted string. + + + + Gets an enumerable of tuples where the first value of each tuple is a value + from the first collection and the second value of each tuple is the value at the same postion + from the second collection. + + The type of values in the first collection. + The type of values in the second collection. + The first of the collections to combine. + The second of the collections to combine. + An enumerable of tuples. + + + + Joins the collection to a string. + + The type of items in the collection. + The items to join. + Separator to insert between each item. + A function that converts from an item to a string value. + A string representation of the collection. + + + + Gets a dictionary containing the first element from the sequence that has a key specified by the key selector. + + The type of items in the sequence. + The type of the key. + The sequence. + The key selector. + A dictionary. + Provides the base for rules that can be built using the FakeConfiguration. @@ -285,19 +564,36 @@ - - - - Configures a call that returns a value and allows the use to - specify validations for arguments. - - The type of the member. - - - - Configures a call that returns a value. - - The type of the member. + + + Configuration for any call to a faked object. + + + + + Provides a way to configure predicates for when a call should be applied. + + The type of fake object that is going to be configured.. + + + + Applies a predicate to constrain which calls will be considered for interception. + + A predicate for a fake object call. + An action that writes a description of the predicate + to the output. + The configuration object. + + + + Provides configuration methods for methods that does not have a return value and + allows the use to specify validations for arguments. + + + + + Provides configuration methods for methods that does not have a return value. + @@ -363,6 +659,33 @@ The action to invoke. A configuration object. + + + Configuration that lets you specify that a fake object call should call it's base method. + + + + + When the configured method or methods are called the call + will be delegated to the base method of the faked method. + + A configuration object. + The fake object is of an abstract type or an interface + and no base method exists. + + + + Lets the developer configure output values of out and ref parameters. + + + + + Specifies output values for out and ref parameters. Specify the values in the order + the ref and out parameters has in the configured call, any non out and ref parameters are ignored. + + The values. + A configuration object. + Allows the developer to assert on a call that's configured. @@ -378,27 +701,10 @@ The call has not been called a number of times that passes the repeat constraint. - - - Configuration that lets you specify that a fake object call should call it's base method. - - - - - When the configured method or methods are called the call - will be delegated to the base method of the faked method. - - A configuration object. - The fake object is of an abstract type or an interface - and no base method exists. - - - - Specifies a function used to produce a return value when the configured call is made. - The function will be called each time this call is made and can return different values - each time. - - A function that produces the return value. + + + Configures the specified call to do nothing when called. + A configuration object. @@ -414,83 +720,6 @@ The argument predicate. A configuration object. - - - Provides a way to configure predicates for when a call should be applied. - - The type of fake object that is going to be configured.. - - - - Applies a predicate to constrain which calls will be considered for interception. - - A predicate for a fake object call. - An action that writes a description of the predicate - to the output. - The configuration object. - - - - Access all types in all assemblies in the same directory as the FakeItEasy dll. - - - - - Provides a set of types that are available. - - - - - Gets a collection of available types. - - The available types. - - - - Initializes a new instance of the class. - - - - - Gets a collection of available types. - - The available types. - - - - Configuration for any call to a faked object. - - - - - Provides configuration methods for methods that does not have a return value and - allows the use to specify validations for arguments. - - - - - Provides configuration methods for methods that does not have a return value. - - - - - Lets the developer configure output values of out and ref parameters. - - - - - Specifies output values for out and ref parameters. Specify the values in the order - the ref and out parameters has in the configured call, any non out and ref parameters are ignored. - - The values. - A configuration object. - - - - Configures the specified call to do nothing when called. - - A configuration object. - Matches calls that has the return type specified in the generic type parameter. @@ -561,19 +790,6 @@ The message. The inner exception. - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - - The parameter is null. - - - The class name is null or is zero (0). - - Handles the configuration of fake object given an expression specifying @@ -602,6 +818,29 @@ interfaces. + + + + Configures a call that returns a value and allows the use to + specify validations for arguments. + + The type of the member. + + + + Configures a call that returns a value. + + The type of the member. + + + + Specifies a function used to produce a return value when the configured call is made. + The function will be called each time this call is made and can return different values + each time. + + A function that produces the return value. + A configuration object. + Configurations for when a configured call is recorded. @@ -695,6 +934,21 @@ The call to match. True if the call matches the predicate. + + + Provides configuration of faked objects. + + + + + Gets a configuration for the specified faked object. + + The type of the fake. + The faked object to configure. + A configuration object. + The specified object is not a faked object. + The fakedObject parameter was null. + Represents an argument and a dummy value to use for that argument. @@ -1019,19 +1273,6 @@ The message. The inner exception. - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - - The parameter is null. - - - The class name is null or is zero (0). - - The central point in the API for proxied fake objects handles interception @@ -1205,6 +1446,32 @@ The fake object. The rule to add. + + + Represents a completed call to a fake object. + + + + + The value set to be returned from the call. + + + + + Used by the event raising rule of fake objects to get the event arguments used in + a call to Raise.With. + + + + + The sender of the event. + + + + + The event arguments of the event. + + Represents a listener for fake object calls, can be plugged into a @@ -1229,105 +1496,6 @@ The rule that was applied to the call. The intercepted call. - - - An interface to be implemented by classes that can generate proxies for FakeItEasy. - - - - - Generates a proxy of the specifed type and returns a result object containing information - about the success of the generation and the proxy if it was generated. - - The type of proxy to generate. - Interfaces to be implemented by the proxy. - Arguments to pass to the constructor of the type in . - A result containging the generated proxy. - - - - Gets a value indicating if the specified member can be intercepted by the proxy generator. - - The member to test. - The instance the method will be called on. - The reason the method can not be intercepted. - True if the member can be intercepted. - - - - An object that raises an event every time a call to a proxy has been intercepted. - - - - - Raised when a call is intercepted. - - - - - Represents a completed call to a fake object. - - - - - The value set to be returned from the call. - - - - - Represents a text writer that writes to the output. - - - - - Writes the specified value to the output. - - The value to write. - The writer for method chaining. - - - - Formats the specified argument value as a string and writes - it to the output. - - The value to write. - The writer for method chainging. - - - - Indents the writer. - - A disposable that will unindent the writer when disposed. - - - - Used by the event raising rule of fake objects to get the event arguments used in - a call to Raise.With. - - - - - The sender of the event. - - - - - The event arguments of the event. - - - - - Providesinstances from type catalogues. - - - - - Gets an instance per type in the catalogue that is a descendant - of the specified type. - - The type of instances to get. - A sequence of instances of the specified type. - Handles comparisons of MethodInfos. @@ -1417,6 +1585,40 @@ + + + An interface to be implemented by classes that can generate proxies for FakeItEasy. + + + + + Generates a proxy of the specifed type and returns a result object containing information + about the success of the generation and the proxy if it was generated. + + The type of proxy to generate. + Interfaces to be implemented by the proxy. + Arguments to pass to the constructor of the type in . + A result containging the generated proxy. + + + + Gets a value indicating if the specified member can be intercepted by the proxy generator. + + The member to test. + The instance the method will be called on. + The reason the method can not be intercepted. + True if the member can be intercepted. + + + + An object that raises an event every time a call to a proxy has been intercepted. + + + + + Raised when a call is intercepted. + + An adapter that adapts an to a . @@ -1760,288 +1962,31 @@ Gets the reason for failure when the generation was not successful. - - - Represents a class that can parse a lambda expression - that represents a method or property call. - - - - - Parses the specified expression. - - The expression to parse. - The parsed expression. - - - - Handles the matching of fake object calls to expressions. - - - - - Initializes a new instance of the class. - - The call specification. - The constraint factory. - A parser to use to parse call expressions. - The method infor manager to use. - - - - Matcheses the specified call against the expression. - - The call to match. - True if the call is matched by the expression. - - - - Gets a description of the call. - - Description of the call. - - - - Gets a human readable description of calls that will be matched by this - matcher. - - - - - An implementation of the interface that uses - expressions for evaluating if the rule is applicable to a specific call. - - - - - Initializes a new instance of the class. - - The expression matcher to use. - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Handles the instantiation of ExpressionCallRule instance. - - An expression specifying the call. - A rule instance. - - - - Manages breaking call specification expression into their various parts. - - - - - Manages breaking call specification expression into their various parts. - - - - - Gets the fake object an expression is called on. - - The call expression. - The FakeManager instance that manages the faked object the call is made on. - The fakeObjectCall is null. - The specified expression is not an expression where a call is made to a faked object. - - - - Gets the fake object an expression is called on. - - The call expression. - A FakeObject. - The fakeObjectCall is null. - The specified expression is not an expression where a call is made to a faked object. - - - - Provides extension methods for configuring and asserting on faked objects - without going through the static methods of the Fake-class. - - - - - Configures the behavior of the fake object when a call that matches the specified - call happens. - - The type of the return value of the member. - An expression that specifies the calls to configure. - The faked object to configure. - The type of fake object to configure. - A configuration object. - - - - Configures the behavior of the fake object when a call that matches the specified - call happens. - - The faked object to configure. - The type of fake object to configure. - An expression that specifies the calls to configure. - A configuration object. - - - - Configures the behavior of the fake object when a call is made to any method on the - object. - - The type of the fake. - The faked object. - A configuration object. - - - - Provides an extension method for configuring fake objects. - - - - - Gets an object that provides a fluent interface syntax for configuring - the fake object. - - The type of the fake object. - The fake object to configure. - A configuration object. - The fakedObject was null. - The object passed in is not a faked object. - - - - Used to tag fields and properties that will be initialized through the - Fake.Initialize-method. - - - - - A simple implementation of an IoC container. - - - - - The dictionary that stores the registered services. - - - - - Initializes a new instance of the class. - - - - - Resolves an instance of the specified component type. - - Type of the component. - An instance of the component type. - - - - Registers the specified resolver. - - The type of component to register. - The resolver. - - - - Registers the specified resolver as a singleton. - - The type of component to register. - The resolver. - - - - Provides properties and methods to specify repeat. - - - - - Specifies the number of times as repeat. - - The number of times expected. - A Repeated instance. - - - - Specifies once as the repeat. - - - - - Specifies twice as the repeat. - - - - - Writes the specified message to the logger. - - The message to write. - - - - Provides functionality for making ordered assertions on fakes. - - - - - Creates a scope that changes the behavior on asserts so that all asserts within - the scope must be to calls in the specified collection of calls. Calls must have happened - in the order that the asserts are specified or the asserts will fail. - - The calls to assert among. - A disposable used to close the scope. - - - - Provides the base implementation for the IFakeConfigurator-interface. - - The type of fakes the configurator can configure. - - - - Provides configurations for fake objects of a specific type. - - - - - Applies the configuration for the specified fake object. - - The fake object to configure. - - - - The type the instance provides configuration for. - - - - - Configures the fake. - - The fake object. - - - - Applies the configuration for the specified fake object. - - The fake object to configure. - - - - Asserts the type of the that fake is of correct. - - The fake object. - - - - The type the instance provides configuration for. - - + + + Represents a text writer that writes to the output. + + + + + Writes the specified value to the output. + + The value to write. + The writer for method chaining. + + + + Formats the specified argument value as a string and writes + it to the output. + + The value to write. + The writer for method chainging. + + + + Indents the writer. + + A disposable that will unindent the writer when disposed. @@ -2084,168 +2029,6 @@ For type. - - - Provides validation extension to the Argumentscope{T} class. - - - - - Constrains an argument so that it must be null (Nothing in VB). - - The type of the argument. - The constraint manager to match the constraint. - A dummy argument value. - - - - Constrains the string argument to contain the specified text. - - The constraint manager to match the constraint. - The string the argument string should contain. - A dummy argument value. - - - - Constrains the sequence so that it must contain the specified value. - - The constraint manager to match the constraint. - The value the collection should contain. - The type of sequence. - A dummy argument value. - - - - Constrains the string so that it must start with the specified value. - - The constraint manager to match the constraint. - The value the string should start with. - A dummy argument value. - - - - Constrains the string so that it must be null or empty. - - The constraint manager to match the constraint. - A dummy argument value. - - - - Constrains argument value so that it must be greater than the specified value. - - The constraint manager to match the constraint. - The value the string should start with. - The type of argument to constrain. - A dummy argument value. - - - - The tested argument collection should contain the same elements as the - as the specified collection. - - The constraint manager to match the constraint. - The sequence to test against. - The type of argument to constrain. - A dummy argument value. - - - - Tests that the IEnumerable contains no items. - - The type of argument. - The constraint manager to match the constraint. - A dummy argument value. - - - - Tests that the passed in argument is equal to the specified value. - - The type of the argument. - The constraint manager to match the constraint. - The value to compare to. - A dummy argument value. - - - - Constrains the argument to be of the specified type. - - The type of argument in the method signature. - The constraint manager. - The type to constrain the argument with. - A dummy value. - - - - Constrains the argument with a predicate. - - - The constraint manager. - - - The predicate that should constrain the argument. - - - A human readable description of the constraint. - - - The type of argument in the method signature. - - - A dummy argument value. - - - - - Constrains the argument with a predicate. - - - The constraint manager. - - - The predicate that should constrain the argument. - - - A human readable description of the constraint format string. - - - Arguments for the format string. - - - The type of argument in the method signature. - - - A dummy argument value. - - - - - Constrains the argument with a predicate. - - - The constraint manager. - - - The predicate that should constrain the argument. - - - The type of argument in the method signature. - - - A dummy argument value. - - - - - Constrains the argument to be not null (Nothing in VB) and to match - the specified predicate. - - The type of the argument to constrain. - The constraint manager. - The predicate that constrains non null values. - An action that writes a description of the constraint - to the output. - A dummy argument value. - A strongly-typed resource class, for looking up localized strings, etc. @@ -2413,126 +2196,6 @@ Looks up a localized string similar to The number of argument names does not match the number of arguments.. - - - Provides static methods for the IOutputWriter-interface. - - - - - Writes a new line to the writer. - - The writer to write to. - The writer. - - - - Writes the format string to the writer. - - The writer to write to. - The format string to write. - Replacements for the format string. - The writer. - - - - Writes the specified object to the writer (using the ToString-method of the object). - - The writer to write to. - The value to write to the writer. - The writer. - - - - Provides syntax for specifying the number of times a call must have been repeated when asserting on - fake object calls. - - A.CallTo(() => foo.Bar()).Assert(Happened.Once.Exactly); - - - - Specifies that a call must have been repeated a number of times - that is validated by the specified repeatValidation argument. - - A predicate that specifies the number of times - a call must have been made. - A Repeated-instance. - - - - When implemented gets a value indicating if the repeat is matched - by the Happened-instance. - - The repeat of a call. - True if the repeat is a match. - - - - Asserts that a call has not happened at all. - - - - - The call must have happened exactly the number of times that is specified in the next step. - - - - - The call must have happened any number of times greater than or equal to the number of times that is specified - in the next step. - - - - - The call must have happened any number of times less than or equal to the number of times that is specified - in the next step. - - - - - Provides methods for creating recorders for self initializing fakes. - - - - - Gets a recorder that records to and loads calls from the specified file. - - The file to use for recording. - A recorder instance. - - - - Provides access to the file system. - - - - - Opens the specified file in the specified mode. - - The full path and name of the file to open. - The mode to open the file in. - A stream for reading and writing the file. - - - - Gets a value indicating if the specified file exists. - - The path and name of the file to check. - True if the file exists. - - - - Creates a file with the specified name. - - The name of the file to create. - - - - Gets the value produced by the specified expression when compiled and invoked. - - The expression to get the value from. - The value produced by the expression. - An exception thrown when an expection is not met (when asserting on fake object calls). @@ -2556,18 +2219,329 @@ The message. The inner exception. - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - - The parameter is null. - - - The class name is null or is zero (0). - + + + Represents a class that can parse a lambda expression + that represents a method or property call. + + + + + Parses the specified expression. + + The expression to parse. + The parsed expression. + + + + Handles the matching of fake object calls to expressions. + + + + + Initializes a new instance of the class. + + The call specification. + The constraint factory. + A parser to use to parse call expressions. + The method infor manager to use. + + + + Matcheses the specified call against the expression. + + The call to match. + True if the call is matched by the expression. + + + + Gets a description of the call. + + Description of the call. + + + + Gets a human readable description of calls that will be matched by this + matcher. + + + + + An implementation of the interface that uses + expressions for evaluating if the rule is applicable to a specific call. + + + + + Initializes a new instance of the class. + + The expression matcher to use. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Handles the instantiation of ExpressionCallRule instance. + + An expression specifying the call. + A rule instance. + + + + Manages breaking call specification expression into their various parts. + + + + + Manages breaking call specification expression into their various parts. + + + + + Gets the fake object an expression is called on. + + The call expression. + The FakeManager instance that manages the faked object the call is made on. + The fakeObjectCall is null. + The specified expression is not an expression where a call is made to a faked object. + + + + Gets the fake object an expression is called on. + + The call expression. + A FakeObject. + The fakeObjectCall is null. + The specified expression is not an expression where a call is made to a faked object. + + + + Provides extension methods for configuring and asserting on faked objects + without going through the static methods of the Fake-class. + + + + + Configures the behavior of the fake object when a call that matches the specified + call happens. + + The type of the return value of the member. + An expression that specifies the calls to configure. + The faked object to configure. + The type of fake object to configure. + A configuration object. + + + + Configures the behavior of the fake object when a call that matches the specified + call happens. + + The faked object to configure. + The type of fake object to configure. + An expression that specifies the calls to configure. + A configuration object. + + + + Configures the behavior of the fake object when a call is made to any method on the + object. + + The type of the fake. + The faked object. + A configuration object. + + + + Provides an extension method for configuring fake objects. + + + + + Gets an object that provides a fluent interface syntax for configuring + the fake object. + + The type of the fake object. + The fake object to configure. + A configuration object. + The fakedObject was null. + The object passed in is not a faked object. + + + + Provides static methods for accessing fake objects. + + + + + Gets the fake object that manages the faked object. + + The faked object to get the manager object for. + The fake object manager. + + + + Creates a new scope and sets it as the current scope. When inside a scope the + getting the calls made to a fake will return only the calls within that scope and when + asserting that calls were made, the calls must have been made within that scope. + + The created scope. + + + + Creates a new scope and sets it as the current scope. When inside a scope the + getting the calls made to a fake will return only the calls within that scope and when + asserting that calls were made, the calls must have been made within that scope. + + The container to use within the specified scope. + The created scope. + + + + Gets a value indicating if the two objects are equal. + + The first object to compare. + The second object to compare. + True if the two objects are equal. + + + + Gets a value indicating if the two objects are the same reference. + + The obj A. + The obj B. + True if the objects are the same reference. + + + + Gets all the calls made to the specified fake object. + + The faked object. + A collection containing the calls to the object. + The object passed in is not a faked object. + + + + Cleares the configuration of the faked object. + + The faked object to clear the configuration of. + + + + Sets a new fake to each property or field that is tagged with the FakeAttribute in the specified + fixture. + + The object to initialize. + + + + Represents a fake object that provides an api for configuring a faked object, exposed by the + FakedObject-property. + + The type of the faked object. + + + + Initializes a new instance of the class. + Creates a new fake object. + + + + + Initializes a new instance of the class. + Creates a new fake object using the specified options. + + + Options used to create the fake object. + + + + + Configures calls to the specified member. + + An expression specifying the call to configure. + A configuration object. + + + + Configures calls to the specified member. + + The type of value the member returns. + An expression specifying the call to configure. + A configuration object. + + + + Configures any call to the fake object. + + A configuration object. + + + + Gets the faked object. + + + + + Gets all calls made to the faked object. + + + + + Used to tag fields and properties that will be initialized through the + Fake.Initialize-method. + + + + + Provides the base implementation for the IFakeConfigurator-interface. + + The type of fakes the configurator can configure. + + + + Provides configurations for fake objects of a specific type. + + + + + Applies the configuration for the specified fake object. + + The fake object to configure. + + + + The type the instance provides configuration for. + + + + + Configures the fake. + + The fake object. + + + + Applies the configuration for the specified fake object. + + The fake object to configure. + + + + Asserts the type of the that fake is of correct. + + The fake object. + + + + The type the instance provides configuration for. + + @@ -2820,76 +2794,6 @@ The type of fake object. when the signatures of the faked method and the do not match - - - A collection of method arguments. - - - - - The arguments this collection contains. - - - - - Initializes a new instance of the class. - - The arguments. - The argument names. - - - - Initializes a new instance of the class. - - The arguments. - The method. - - - - Returns an enumerator that iterates through the collection or arguments. - - - A that can be used to iterate through the collection. - - - - - Gets the argument at the specified index. - - The type of the argument to get. - The index of the argument. - The argument at the specified index. - - - - Gets the argument with the specified name. - - The type of the argument to get. - The name of the argument. - The argument with the specified name. - - - - Gets an empty ArgumentList. - - - - - Gets the number of arguments in the list. - - - - - Gets the names of the arguments in the list. - - - - - Gets the argument at the specified index. - - The index of the argument to get. - The argument at the specified index. - Provides methods for guarding method arguments. @@ -2921,124 +2825,159 @@ The value to guard. Name of the argument. - - - Provides static methods for accessing fake objects. - - - - - Gets the fake object that manages the faked object. - - The faked object to get the manager object for. - The fake object manager. - - - - Creates a new scope and sets it as the current scope. When inside a scope the - getting the calls made to a fake will return only the calls within that scope and when - asserting that calls were made, the calls must have been made within that scope. - - The created scope. - - - - Creates a new scope and sets it as the current scope. When inside a scope the - getting the calls made to a fake will return only the calls within that scope and when - asserting that calls were made, the calls must have been made within that scope. - - The container to use within the specified scope. - The created scope. - - - - Gets a value indicating if the two objects are equal. - - The first object to compare. - The second object to compare. - True if the two objects are equal. - - - - Gets a value indicating if the two objects are the same reference. - - The obj A. - The obj B. - True if the objects are the same reference. - - - - Gets all the calls made to the specified fake object. - - The faked object. - A collection containing the calls to the object. - The object passed in is not a faked object. - - - - Cleares the configuration of the faked object. - - The faked object to clear the configuration of. - - - - Sets a new fake to each property or field that is tagged with the FakeAttribute in the specified - fixture. - - The object to initialize. - - - - Represents a fake object that provides an api for configuring a faked object, exposed by the - FakedObject-property. - - The type of the faked object. - - - - Initializes a new instance of the class. - Creates a new fake object. - - - - - Initializes a new instance of the class. - Creates a new fake object using the specified options. - - - Options used to create the fake object. - - - - - Configures calls to the specified member. - - An expression specifying the call to configure. - A configuration object. - - - - Configures calls to the specified member. - - The type of value the member returns. - An expression specifying the call to configure. - A configuration object. - - - - Configures any call to the fake object. - - A configuration object. - - - - Gets the faked object. - - - - - Gets all calls made to the faked object. - + + + Gets the value produced by the specified expression when compiled and invoked. + + The expression to get the value from. + The value produced by the expression. + + + + Provides access to the file system. + + + + + Opens the specified file in the specified mode. + + The full path and name of the file to open. + The mode to open the file in. + A stream for reading and writing the file. + + + + Gets a value indicating if the specified file exists. + + The path and name of the file to check. + True if the file exists. + + + + Creates a file with the specified name. + + The name of the file to create. + + + + A simple implementation of an IoC container. + + + + + The dictionary that stores the registered services. + + + + + Initializes a new instance of the class. + + + + + Resolves an instance of the specified component type. + + Type of the component. + An instance of the component type. + + + + Registers the specified resolver. + + The type of component to register. + The resolver. + + + + Registers the specified resolver as a singleton. + + The type of component to register. + The resolver. + + + + Provides properties and methods to specify repeat. + + + + + Specifies the number of times as repeat. + + The number of times expected. + A Repeated instance. + + + + Specifies once as the repeat. + + + + + Specifies twice as the repeat. + + + + + Writes the specified message to the logger. + + The message to write. + + + + Lets you specify options for the next call to a fake object. + + + + + Specifies options for the next call to the specified fake object. The next call will + be recorded as a call configuration. + + The type of the faked object. + The faked object to configure. + A call configuration object. + + + + Provides functionality for making ordered assertions on fakes. + + + + + Creates a scope that changes the behavior on asserts so that all asserts within + the scope must be to calls in the specified collection of calls. Calls must have happened + in the order that the asserts are specified or the asserts will fail. + + The calls to assert among. + A disposable used to close the scope. + + + + Provides static methods for the IOutputWriter-interface. + + + + + Writes a new line to the writer. + + The writer to write to. + The writer. + + + + Writes the format string to the writer. + + The writer to write to. + The format string to write. + Replacements for the format string. + The writer. + + + + Writes the specified object to the writer (using the ToString-method of the object). + + The writer to write to. + The value to write to the writer. + The writer. @@ -3094,6 +3033,57 @@ Gets a generic event handler to attatch to the event to raise. + + + Provides methods for creating recorders for self initializing fakes. + + + + + Provides syntax for specifying the number of times a call must have been repeated when asserting on + fake object calls. + + A.CallTo(() => foo.Bar()).Assert(Happened.Once.Exactly); + + + + Specifies that a call must have been repeated a number of times + that is validated by the specified repeatValidation argument. + + A predicate that specifies the number of times + a call must have been made. + A Repeated-instance. + + + + When implemented gets a value indicating if the repeat is matched + by the Happened-instance. + + The repeat of a call. + True if the repeat is a match. + + + + Asserts that a call has not happened at all. + + + + + The call must have happened exactly the number of times that is specified in the next step. + + + + + The call must have happened any number of times greater than or equal to the number of times that is specified + in the next step. + + + + + The call must have happened any number of times less than or equal to the number of times that is specified + in the next step. + + Handles the registration of root dependencies in an IoC-container. @@ -3155,35 +3145,6 @@ The calls to save. - - - Initializes a new instance of the class. - - Name of the file. - The file system. - - - - Loads the recorded calls for the specified recording. - - - The recorded calls for the recording with the specified id. - - - - - Saves the specified calls as the recording with the specified id, - overwriting any previous recording. - - The calls to save. - - - - A factory responsible for creating instances of FileStorage. - - The file name of the storage. - A FileStorage instance. - An interface for recorders that provides stored responses for self initializing fakes. @@ -3230,19 +3191,6 @@ The message. The inner exception. - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - - The parameter is null. - - - The class name is null or is zero (0). - - Manages the applying of recorded calls and recording of new calls when @@ -3322,53 +3270,6 @@ - - - Provides extension methods for the common uses. - - - - - Replaces the format item in a specified System.String with the text equivalent - of the value of a corresponding System.Object instance in a specified array using - invariant culture as . - - A composite format string. - An array containing zero or more objects to format. - The formatted string. - - - - Gets an enumerable of tuples where the first value of each tuple is a value - from the first collection and the second value of each tuple is the value at the same postion - from the second collection. - - The type of values in the first collection. - The type of values in the second collection. - The first of the collections to combine. - The second of the collections to combine. - An enumerable of tuples. - - - - Joins the collection to a string. - - The type of items in the collection. - The items to join. - Separator to insert between each item. - A function that converts from an item to a string value. - A string representation of the collection. - - - - Gets a dictionary containing the first element from the sequence that has a key specified by the key selector. - - The type of items in the sequence. - The type of the key. - The sequence. - The key selector. - A dictionary. - An attribute that can be applied to code that should be fixed becuase theres a @@ -3380,24 +3281,22 @@ A description of the smell. - - - Lets you specify options for the next call to a fake object. - - - - - Specifies options for the next call to the specified fake object. The next call will - be recorded as a call configuration. - - The type of the faked object. - The faked object to configure. - A call configuration object. - Used to tag fields and properties that will be initialized as a SUT through the Fake.Initialize-mehtod. + + + Fixes so that existing Serializable-attributes are omitted in the compilation + of the silverlight project. + + + + + Fixes so that existing NonSerialized-attributes are omitted in the compilation + of the silverlight project. + + diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/Libs/FluentAssertions.Silverlight.dll Binary file SilverlightValidation/Libs/FluentAssertions.Silverlight.dll has changed diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/Libs/FluentAssertions.Silverlight.pdb Binary file SilverlightValidation/Libs/FluentAssertions.Silverlight.pdb has changed diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/Libs/FluentAssertions.Silverlight.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/Libs/FluentAssertions.Silverlight.xml Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,5260 @@ + + + + FluentAssertions.Silverlight + + + + + Initializes a new instance of the class. + + + + + Contains extension methods for custom assertions in unit tests. + + + + + Invokes the specified action on an subject so that you can chain it with any of the ShouldThrow or ShouldNotThrow + overloads. + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current . + + + + + Asserts that the throws an exception. + + + The type of the exception it should throw. + + + Returns an object that allows asserting additional members of the thrown exception. + + + + + Asserts that the throws an exception. + + A reference to the method or property. + + The type of the exception it should throw. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + Returns an object that allows asserting additional members of the thrown exception. + + + + + Asserts that the does not throw a particular exception. + + + The type of the exception it should not throw. Any other exceptions are ignored and will satisfy the assertion. + + + + + Asserts that the does not throw a particular exception. + + The current method or property. + + The type of the exception it should not throw. Any other exceptions are ignored and will satisfy the assertion. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that the does not throw any exception at all. + + + + + Asserts that the does not throw any exception at all. + + The current method or property. + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Forces enumerating a collection. Should be used to assert that a method that uses the + yield keyword throws a particular exception. + + + + + Forces enumerating a collection. Should be used to assert that a method that uses the + yield keyword throws a particular exception. + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current nullable . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current nullable . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current nullable . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current nullable . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current nullable . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current nullable . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current nullable . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current nullable . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current nullable . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current . + + + + + Returns an object that can be used to assert the + current nullable . + + + + + Asserts that the properties of an object matches those of another object. + + + + + Returns a object that can be used to assert the + current . + + + + + Returns a object that can be used to assert the methods returned by the + current . + + + + + + Returns a object that can be used to assert the properties returned by the + current . + + + + + + Safely casts the specified object to the type specified through . + + + Has been introduced to allow casting objects without breaking the fluent API. + + + + + + Contains a number of methods to assert that an yields the expected result. + + + + + Asserts that the current throws an exception of type . + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current does not throw an exception of type . + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current does not throw any exception. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Gets the that is being asserted. + + + + + Contains a number of methods to assert that a is in the expected state. + + + + + Asserts that the value is false. + + + + + Asserts that the value is false. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the value is true. + + + + + Asserts that the value is true. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the value is equal to the specified value. + + The expected value + + + + Asserts that the value is equal to the specified value. + + The expected value + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Gets the object which value is being asserted. + + + + + Contains a number of methods to assert that an is in the expected state. + + + + + Contains a number of methods to assert that a reference type object is in the expected state. + + + + + Asserts that the object is of the specified type . + + The expected type of the object. + + + + Asserts that the object is of the specified type . + + The expected type of the object. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the object is assignable to a variable of type . + + The type to which the object should be assignable. + An which can be used to chain assertions. + + + + Asserts that the object is assignable to a variable of type . + + The type to which the object should be assignable. + The reason why the object should be assignable to the type. + The parameters used when formatting the . + An which can be used to chain assertions. + + + + Asserts that the is statisfied. + + The predicate which must be satisfied by the . + An which can be used to chain assertions. + + + + Asserts that the is satisfied. + + The predicate which must be statisfied by the . + The reason why the predicate should be satisfied. + The parameters used when formatting the . + An which can be used to chain assertions. + + + + Asserts that the is satisfied. + + The predicate which must be statisfied by the . + An which can be used to chain assertions. + + + + Asserts that the is satisfied. + + The predicate which must be statisfied by the . + The reason why the predicate should be satisfied. + The parameters used when formatting the . + An which can be used to chain assertions. + + + + Gets the object which value is being asserted. + + + + + Asserts that the number of items in the collection matches the supplied amount. + + The expected number of items in the collection. + + + + Asserts that the number of items in the collection matches the supplied amount. + + The expected number of items in the collection. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the number of items in the collection matches a condition stated by the . + + A predicate that yields the number of items that is expected to be in the collection. + + + + Asserts that the number of items in the collection matches a condition stated by the . + + A predicate that yields the number of items that is expected to be in the collection. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the collection does not contain any items. + + + + + Asserts that the collection does not contain any items. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the collection contains at least 1 item. + + + + + Asserts that the collection contains at least 1 item. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the collection does not contain any duplicate items. + + + + + Asserts that the collection does not contain any duplicate items. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the collection does not contain any null items. + + + + + Asserts that the collection does not contain any null items. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Expects the current collection to contain all the same elements in the same order as the collection identified by + . Elements are compared using their . + + An with the expected items. + + + + Expects the current collection to contain all the same elements in the same order as the collection identified by + . Elements are compared using their . + + A params array with the expected elements. + + + + Expects the current collection to contain all the same elements in the same order as the collection identified by + . Elements are compared using their . + + An with the expected elements. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Expects the current collection not to contain all the same elements in the same order as the collection identified by + . Elements are compared using their . + + An with the elements that are not expected. + + + + Expects the current collection not to contain all the same elements in the same order as the collection identified by + . Elements are compared using their . + + An with the elements that are not expected. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Expects the current collection to contain all elements of the collection identified by , + regardless of the order. Elements are compared using their . + + An with the expected elements. + + + + Expects the current collection to contain all elements of the collection identified by , + regardless of the order. Elements are compared using their . + + A params array with the expected elements. + + + + Expects the current collection to contain all elements of the collection identified by , + regardless of the order. Elements are compared using their . + + An with the expected elements. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Expects the current collection not to contain all elements of the collection identified by , + regardless of the order. Elements are compared using their . + + An with the unexpected elements. + + + + Expects the current collection not to contain all elements of the collection identified by , + regardless of the order. Elements are compared using their . + + An with the unexpected elements. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current collection only contains items that are assignable to the type . + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Expects the current collection to contain the specified elements in any order. Elements are compared + using their implementation. + + An with the expected elements. + + + + Expects the current collection to contain the specified elements in any order. Elements are compared + using their implementation. + + An with the expected elements. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Expects the current collection to contain the specified elements in the exact same order. Elements are compared + using their implementation. + + An with the expected elements. + + + + Expects the current collection to contain the specified elements in the exact same order. Elements are compared + using their implementation. + + An with the expected elements. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the collection is a subset of the . + + An with the expected superset. + + + + Asserts that the collection is a subset of the . + + An with the expected superset. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the collection is not a subset of the . + + An with the unexpected superset. + + + + Asserts that the collection is not a subset of the . + + An with the unexpected superset. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Assert that the current collection has the same number of elements as . + + The other collection with the same expected number of elements + + + + Assert that the current collection has the same number of elements as . + + The other collection with the same expected number of elements + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current collection has not been initialized yet with an actual collection. + + + + + Asserts that the current collection has not been initialized yet with an actual collection. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current collection has been initialized with an actual collection. + + + + + Asserts that the current collection has been initialized with an actual collection. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current collection has the supplied at the + supplied . + + The index where the element is expected + The expected element + + + + Asserts that the current collection has the supplied at the + supplied . + + The index where the element is expected + The expected element + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current collection only contains items that are assignable to the type . + + + + + Asserts that the current collection does not contain the supplied item. + + The element that is not expected to be in the collection + + + + Asserts that the current collection does not contain the supplied item. + + The element that is not expected to be in the collection + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Contains a number of methods to assert that an is in the expected state. + + + + + Asserts that the subject is considered equal to another object according to the implementation of . + + + The object to pass to the subject's method. + + + + + Asserts that the subject is considered equal to another object according to the implementation of . + + + The object to pass to the subject's method. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the subject is not equal to another object according to its implementation of . + + + The object to pass to the subject's method. + + + + + Asserts that the subject is not equal to another object according to its implementation of . + + + The object to pass to the subject's method. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the subject is less than another object according to its implementation of . + + + The object to pass to the subject's method. + + + + + Asserts that the subject is less than another object according to its implementation of . + + + The object to pass to the subject's method. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the subject is less than or equal to another object according to its implementation of . + + + The object to pass to the subject's method. + + + + + Asserts that the subject is less than or equal to another object according to its implementation of . + + + The object to pass to the subject's method. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the subject is greater than another object according to its implementation of . + + + The object to pass to the subject's method. + + + + + Asserts that the subject is greater than another object according to its implementation of . + + + The object to pass to the subject's method. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the subject is greater than or equal to another object according to its implementation of . + + + The object to pass to the subject's method. + + + + + Asserts that the subject is greater than or equal to another object according to its implementation of . + + + The object to pass to the subject's method. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a value is within a range. + + + Where the range is continuous or incremental depends on the actual type of the value. + + + The minimum valid value of the range. + + + The maximum valid value of the range. + + + + + Asserts that a value is within a range. + + + Where the range is continuous or incremental depends on the actual type of the value. + + + The minimum valid value of the range. + + + The maximum valid value of the range. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a nullable numeric value is not null. + + + + + Asserts that a nullable numeric value is not null. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a nullable numeric value is null. + + + + + Asserts that a nullable numeric value is null. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Gets the object which value is being asserted. + + + + + Defines the way compares the expected exception + message with the actual one. + + + + + The message must match exactly, including the casing of the characters. + + + + + The message must match except for the casing of the characters. + + + + + The message must start with the exact text, including the casing of the characters.. + + + + + The message must start with the text except for the casing of the characters. + + + + + The message must contain the exact text. + + + + + The message must contain the text except for the casing of the characters. + + + + + The message must match a wildcard pattern consisting of ordinary characters as well as * and ?. + + + + + Indication of how cyclic references should be handled when validating equality of nested properties. + + + + + Cyclic references will be ignored. + + + + + Cyclic references will result in an exception. + + + + + Contains a number of methods to assert that a is in the expected state. + + + You can use the for a more fluent way of specifying a . + + + + + Asserts that the current is exactly equal to the value. + + + + + Asserts that the current is exactly equal to the value. + + The expected value + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current is not equal to the value. + + The unexpected value + + + + Asserts that the current is not equal to the value. + + The unexpected value + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current is before the specified value. + + The that the current value is expected to be before. + + + + Asserts that the current is before the specified value. + + The that the current value is expected to be before. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current is either on, or before the specified value. + + The that the current value is expected to be on or before. + + + + Asserts that the current is either on, or before the specified value. + + The that the current value is expected to be on or before. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current is after the specified value. + + The that the current value is expected to be after. + + + + Asserts that the current is after the specified value. + + The that the current value is expected to be after. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current is either on, or after the specified value. + + The that the current value is expected to be on or after. + + + + Asserts that the current is either on, or after the specified value. + + The that the current value is expected to be on or after. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current has the year. + + The expected year of the current value. + + + + Asserts that the current has the year. + + The expected year of the current value. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current has the month. + + The expected month of the current value. + + + + Asserts that the current has the month. + + The expected month of the current value. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current has the day. + + The expected day of the current value. + + + + Asserts that the current has the day. + + The expected day of the current value. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current has the hour. + + The expected hour of the current value. + + + + Asserts that the current has the hour. + + The expected hour of the current value. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current has the minute. + + The expected minutes of the current value. + + + + Asserts that the current has the minute. + + The expected minutes of the current value. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current has the second. + + The expected seconds of the current value. + + + + Asserts that the current has the second. + + The expected seconds of the current value. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Returns a object that can be used to assert that the current + exceeds the specified compared to another . + + + The amount of time that the current should exceed compared to another . + + + + + Returns a object that can be used to assert that the current + is equal to or exceeds the specified compared to another . + + + The amount of time that the current should be equal or exceed compared to + another . + + + + + Returns a object that can be used to assert that the current + differs exactly the specified compared to another . + + + The amount of time that the current should differ exactly compared to another . + + + + + Returns a object that can be used to assert that the current + is within the specified compared to another . + + + The amount of time that the current should be within another . + + + + + Returns a object that can be used to assert that the current + differs at maximum the specified compared to another . + + + The maximum amount of time that the current should differ compared to another . + + + + + Gets the object which value is being asserted. + + + + + Contains a number of methods to assert that an is in the correct state. + + + + + Asserts that the thrown exception has a message that exactly matches the + + + The expected message of the exception. + + + + + Asserts that the thrown exception has a message that matches + depending on the specified matching mode. + + + The expected message of the exception. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the thrown exception has a message that matches + depending on the specified matching mode. + + + The expected message of the exception. + + + Determines how the expected message is compared with the actual message. + + + + + Asserts that the thrown exception has a message that matches + depending on the specified matching mode. + + + The expected message of the exception. + + + Determines how the expected message is compared with the actual message. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the thrown exception contains an inner exception of type . + + The expected type of the inner exception. + + + + Asserts that the thrown exception contains an inner exception of type . + + The expected type of the inner exception. + The reason why the inner exception should be of the supplied type. + The parameters used when formatting the . + + + + Asserts that the thrown exception contains an inner exception with the . + + The expected message of the inner exception. + + + + Asserts that the thrown exception contains an inner exception with the . + + The expected message of the inner exception. + Determines how the expected message is compared with the actual message. + + + + Asserts that the thrown exception contains an inner exception with the . + + The expected message of the inner exception. + + The reason why the message of the inner exception should match . + + The parameters used when formatting the . + + + + Asserts that the thrown exception contains an inner exception with the . + + The expected message of the inner exception. + Determines how the expected message is compared with the actual message. + + The reason why the message of the inner exception should match . + + The parameters used when formatting the . + + + + Asserts that the exception matches a particular condition. + + + The condition that the exception must match. + + + + + Asserts that the exception matches a particular condition. + + + The condition that the exception must match. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Gets the exception object of the exception thrown. + + + + + Contains a number of extension methods for floating point . + + + + + Asserts a floating point value approximates another value as close as possible. + + The object that is being extended. + + The expected value to compare the actual value with. + + + The maximum amount of which the two values may differ. + + + + + Asserts a floating point value approximates another value as close as possible. + + The object that is being extended. + + The expected value to compare the actual value with. + + + The maximum amount of which the two values may differ. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts a floating point value approximates another value as close as possible. + + The object that is being extended. + + The expected value to compare the actual value with. + + + The maximum amount of which the two values may differ. + + + + + Asserts a floating point value approximates another value as close as possible. + + The object that is being extended. + + The expected value to compare the actual value with. + + + The maximum amount of which the two values may differ. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts a floating point value approximates another value as close as possible. + + The object that is being extended. + + The expected value to compare the actual value with. + + + The maximum amount of which the two values may differ. + + + + + Asserts a floating point value approximates another value as close as possible. + + The object that is being extended. + + The expected value to compare the actual value with. + + + The maximum amount of which the two values may differ. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts a floating point value approximates another value as close as possible. + + The object that is being extended. + + The expected value to compare the actual value with. + + + The maximum amount of which the two values may differ. + + + + + Asserts a floating point value approximates another value as close as possible. + + The object that is being extended. + + The expected value to compare the actual value with. + + + The maximum amount of which the two values may differ. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Contains a number of methods to assert that an is in the expected state. + + + + + Asserts that the collection contains the specified item. + + + + + Asserts that the collection contains the specified item. + + The expected item. + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that the collection contains some extra items in addition to the original items. + + An of expected items. + Additional items that are expected to be contained by the collection. + + + + Asserts that the collection contains at least one item that matches the predicate. + + A predicate to match the items in the collection against. + + + + Asserts that the collection contains at least one item that matches the predicate. + + A predicate to match the items in the collection against. + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that the collection only contains items that match a predicate. + + A predicate to match the items in the collection against. + + + + Asserts that the collection only contains items that match a predicate. + + A predicate to match the items in the collection against. + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that the collection does not contain any items that match the predicate. + + A predicate to match the items in the collection against. + + + + Asserts that the collection does not contain any items that match the predicate. + + A predicate to match the items in the collection against. + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Contains a number of methods to assert that an is in the expected state. + + + + + Asserts that the current dictionary has not been initialized yet with an actual dictionary. + + + + + Asserts that the current dictionary has not been initialized yet with an actual dictionary. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current dictionary has been initialized with an actual dictionary. + + + + + Asserts that the current dictionary has been initialized with an actual dictionary. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the number of items in the dictionary matches the supplied amount. + + The expected number of items. + + + + Asserts that the number of items in the dictionary matches the supplied amount. + + The expected number of items. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the number of items in the dictionary matches a condition stated by a predicate. + + The predicate which must be statisfied by the amount of items. + + + + Asserts that the number of items in the dictionary matches a condition stated by a predicate. + + The predicate which must be statisfied by the amount of items. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the dictionary does not contain any items. + + + + + Asserts that the dictionary does not contain any items. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the dictionary contains at least 1 item. + + + + + Asserts that the dictionary contains at least 1 item. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current dictionary contains all the same key-value pairs as the + specified dictionary. Keys and values are compared using + their implementation. + + The expected dictionary + + + + Asserts that the current dictionary contains all the same key-value pairs as the + specified dictionary. Keys and values are compared using + their implementation. + + The expected dictionary + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts the current dictionary not to contain all the same key-value pairs as the + specified dictionary. Keys and values are compared using + their implementation. + + The unexpected dictionary + + + + Asserts the current dictionary not to contain all the same key-value pairs as the + specified dictionary. Keys and values are compared using + their implementation. + + The unexpected dictionary + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the dictionary contains the specified key. Keys are compared using + their implementation. + + The expected key + + + + Asserts that the dictionary contains the specified key. Keys are compared using + their implementation. + + The expected key + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the dictionary contains all of the specified keys. Keys are compared using + their implementation. + + The expected keys + + + + Asserts that the dictionary contains all of the specified keys. Keys are compared using + their implementation. + + The expected keys + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current dictionary does not contain the specified key. + Keys are compared using their implementation. + + The unexpected key + + + + Asserts that the current dictionary does not contain the specified key. + Keys are compared using their implementation. + + The unexpected key + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the dictionary contains the specified value. Values are compared using + their implementation. + + The expected value + + + + Asserts that the dictionary contains the specified value. Values are compared using + their implementation. + + The expected value + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the dictionary contains all of the specified values. Values are compared using + their implementation. + + The expected values + + + + Asserts that the dictionary contains all of the specified values. Values are compared using + their implementation. + + The expected values + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current dictionary does not contain the specified value. + Values are compared using their implementation. + + The unexpected value + + + + Asserts that the current dictionary does not contain the specified value. + Values are compared using their implementation. + + The unexpected value + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current dictionary contains the specified . + Keys and values are compared using their implementation. + + The expected + + + + Asserts that the current dictionary contains the specified . + Keys and values are compared using their implementation. + + The expected + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current dictionary contains the specified for the supplied . Values are compared using their implementation. + + The key for which to validate the value + The value to validate + + + + Asserts that the current dictionary contains the specified for the supplied . Values are compared using their implementation. + + The key for which to validate the value + The value to validate + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current dictionary does not contain the specified . + Keys and values are compared using their implementation. + + The unexpected + + + + Asserts that the current dictionary does not contain the specified . + Keys and values are compared using their implementation. + + The unexpected + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current dictionary does not contain the specified for the + supplied . Values are compared using their implementation. + + The key for which to validate the value + The value to validate + + + + Asserts that the current dictionary does not contain the specified for the + supplied . Values are compared using their implementation. + + The key for which to validate the value + The value to validate + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Gets the object which value is being asserted. + + + + + Contains a number of methods to assert that a is in the correct state. + + + + + Asserts that the is . + + + + + Asserts that the is . + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the is not . + + + + + Asserts that the is not . + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the is equal to the GUID. + + The expected value to compare the actual value with. + + + + Asserts that the is equal to the GUID. + + The expected value to compare the actual value with. + + + + Asserts that the is equal to the GUID. + + The expected value to compare the actual value with. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the is equal to the GUID. + + The expected value to compare the actual value with. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the is not equal to the GUID. + + The unexpected value to compare the actual value with. + + + + Asserts that the is not equal to the GUID. + + The unexpected value to compare the actual value with. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Gets the object which value is being asserted. + + + + + Contains a number of methods to assert that an integral number is in the correct state. + + + + + Contains a number of methods to assert that an is in the expected state. + + + + + Asserts that the numeric value is greater than or equal to zero. + + + + + Asserts that the numeric value is greater than or equal to zero. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the numeric value is less than zero. + + + + + Asserts that the numeric value is less than zero. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the numeric value is less than the specified value. + + The value to compare the current numeric value with. + + + + Asserts that the numeric value is less than the specified value. + + The value to compare the current numeric value with. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the numeric value is less than or equal to the specified value. + + The value to compare the current numeric value with. + + + + Asserts that the numeric value is less than or equal to the specified value. + + The value to compare the current numeric value with. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the numeric value is greater than the specified value. + + The value to compare the current numeric value with. + + + + Asserts that the numeric value is greater than the specified value. + + The value to compare the current numeric value with. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the numeric value is greater than or equal to the specified value. + + The value to compare the current numeric value with. + + + + Asserts that the numeric value is greater than or equal to the specified value. + + The value to compare the current numeric value with. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a value is within a range. + + + Where the range is continuous or incremental depends on the actual type of the value. + + + The minimum valid value of the range. + + + The maximum valid value of the range. + + + + + Asserts that a value is within a range. + + + Where the range is continuous or incremental depends on the actual type of the value. + + + The minimum valid value of the range. + + + The maximum valid value of the range. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the integral number value is exactly the same as the value. + + The expected value. + + + + Asserts that the integral number value is exactly the same as the value. + + The expected value. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the integral number value is not the same as the value. + + The unexpected value. + + + + Asserts that the integral number value is not the same as the value. + + The unexpected value. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Contains assertions for the objects returned by the parent . + + + + + Initializes a new instance of the class. + + The methods. + + + + Asserts that the selected methods are virtual. + + + + + Asserts that the selected methods are virtual. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the selected methods are decorated with the specified . + + + + + Asserts that the selected methods are decorated with the specified . + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Gets the object which value is being asserted. + + + + + Allows for fluent selection of methods of a type through reflection. + + + + + Initializes a new instance of the class. + + The type from which to select methods. + + + + Initializes a new instance of the class. + + The types from which to select methods. + + + + Only select the methods that return the specified type + + + + + Only select the methods that are decorated with an attribute of the specified type. + + + + + The resulting objects. + + + + + Determines whether the specified method has a special name (like properties and events). + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Only select the methods that are public or internal. + + + + + Only select the methods without a return value + + + + + Contains a number of methods to assert that an is in the expected state. + + + + + Asserts that the current collection contains the specified object. Elements are compared + using their implementation. + + An object, or of objects that are expected to be in the collection. + + + + Asserts that the current collection contains the specified object. Elements are compared + using their implementation. + + An object, or of objects that are expected to be in the collection. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Contains a number of methods to assert that a nullable is in the expected state. + + + + + Asserts that a nullable boolean value is not null. + + + + + Asserts that a nullable boolean value is not null. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a nullable boolean value is null. + + + + + Asserts that a nullable boolean value is null. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the value is equal to the specified value. + + The expected value + + + + Asserts that the value is equal to the specified value. + + The expected value + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Contains a number of methods to assert that a nullable is in the expected state. + + + You can use the for a more fluent way of specifying a . + + + + + Asserts that a nullable value is not null. + + + + + Asserts that a nullable value is not null. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a nullable value is null. + + + + + Asserts that a nullable value is null. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the value is equal to the specified value. + + The expected value + + + + Asserts that the value is equal to the specified value. + + The expected value + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Contains a number of methods to assert that a nullable is in the expected state. + + + + + Asserts that a nullable value is not null. + + + + + Asserts that a nullable value is not null. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a nullable value is null. + + + + + Asserts that a nullable value is null. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the value is equal to the specified value. + + The expected value + + + + Asserts that the value is equal to the specified value. + + The expected value + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Contains a number of methods to assert that a nullable numeric value has the expected value. + + + + + Asserts that a nullable numeric value is not null. + + + + + Asserts that a nullable numeric value is not null. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a nullable numeric value is null. + + + + + Asserts that a nullable numeric value is null. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Contains a number of methods to assert that a nullable is in the expected state. + + + You can use the for a more fluent way of specifying a . + + + + + Contains a number of methods to assert that a nullable is in the expected state. + + + + + Asserts that the time difference of the current is greater than zero. + + + + + Asserts that the time difference of the current is greater than zero. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the time difference of the current is less than zero. + + + + + Asserts that the time difference of the current is less than zero. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the time difference of the current is equal to the + specified time. + + The expected time difference + + + + Asserts that the time difference of the current is equal to the + specified time. + + The expected time difference + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the time difference of the current is not equal to the + specified time. + + The unexpected time difference + + + + Asserts that the time difference of the current is not equal to the + specified time. + + The unexpected time difference + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the time difference of the current is less than the + specified time. + + The time difference to which the current value will be compared + + + + Asserts that the time difference of the current is less than the + specified time. + + The time difference to which the current value will be compared + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the time difference of the current is less than or equal to the + specified time. + + The time difference to which the current value will be compared + + + + Asserts that the time difference of the current is less than or equal to the + specified time. + + The time difference to which the current value will be compared + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the time difference of the current is greater than the + specified time. + + The time difference to which the current value will be compared + + + + Asserts that the time difference of the current is greater than the + specified time. + + The time difference to which the current value will be compared + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the time difference of the current is greater than or equal to the + specified time. + + The time difference to which the current value will be compared + + + + Asserts that the time difference of the current is greater than or equal to the + specified time. + + The time difference to which the current value will be compared + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Gets the object which value is being asserted. + + + + + Asserts that a nullable value is not null. + + + + + Asserts that a nullable value is not null. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a nullable value is null. + + + + + Asserts that a nullable value is null. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Contains a number of methods to assert that an is in the expected state. + + + + + Asserts that the value of an object equals another object when using it's method. + + The expected value + + + + Asserts that an object equals another object using its implementation. + + The expected value + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that an object does not equal another object using it's method. + + The unexpected value + + + + Asserts that an object does not equal another object using it's method. + + The unexpected value + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that an object reference refers to the exact same object as another object reference. + + The expected object + + + + Asserts that an object reference refers to the exact same object as another object reference. + + The expected object + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that an object reference refers to a different object than another object reference refers to. + + The unexpected object + + + + Asserts that an object reference refers to a different object than another object reference refers to. + + The unexpected object + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that the object is null. + + + + + Asserts that the object is null. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that the object is not null. + + + + + Asserts that the object is not null. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that an object can be serialized and deserialized using the XML serializer and that it stills retains + the values of all properties. + + + + + Asserts that an object can be serialized and deserialized using the XML serializer and that it stills retains + the values of all properties. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Provides methods for selecting one or more properties of an object and comparing them with another object. + + + + + Includes all properties of when comparing the subject with another object using . + + + + + Includes all properties of including those of the run-time type when comparing the subject + with another object using . + + + + + Includes all properties of when comparing the subject with another object using , + except those that the other object does not have. + + + + + Perform recursive property comparison of the child properties for objects that are of incompatible type. + + + + + + Includes all properties of when comparing the subject with another object using , + except those specified using a property expression. + + A single property expression to exclude. + Optional list of additional property expressions to exclude. + + + + Excludes the properties specified by the from the comparison. + + A single property expression to exclude. + Optional list of additional property expressions to exclude. + + + + Includes only those properties of when comparing the subject with another object using + that were specified using a property expression. + + A single property expression to include. + Optional list of additional property expressions to include. + + + + Asserts that the previously selected properties of have the same value as the equally named + properties of . + + The object to compare the current object with + + Property values are considered equal if, after converting them to the requested type, calling + returns true. + + + + + Asserts that the previously selected properties of have the same value as the equally named + properties of . + + The object to compare the current object with + + Property values are considered equal if, after converting them to the requested type, calling + returns true. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Gets the object which value is being asserted. + + + + + Is responsible for validating the equality of one or more properties of a subject with another object. + + + + + Contains the properties that should be included when comparing two objects. + + + + + Gets or sets a value indicating whether the validator will ignore properties from the + collection that the object doesn't have. + + + + + Gets or sets a value indicating whether it should continue comparing (collections of objects) that + the refers to. + + + + + Gets or sets a value indicating how cyclic references that are encountered while comparing (collections of) + objects should be handled. + + + + + Contains assertions for the objects returned by the parent . + + + + + Initializes a new instance of the class. + + The properties. + + + + Asserts that the selected properties are virtual. + + + + + Asserts that the selected properties are virtual. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the selected methods are decorated with the specified . + + + + + Asserts that the selected methods are decorated with the specified . + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Gets the object which value is being asserted. + + + + + Allows for fluent selection of properties of a type through reflection. + + + + + Initializes a new instance of the class. + + The type from which to select properties. + + + + Initializes a new instance of the class. + + The types from which to select properties. + + + + Only select the properties that are decorated with an attribute of the specified type. + + + + + Only select the properties that return the specified type + + + + + The resulting objects. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Only select the properties that have a public or internal getter. + + + + + Contains a number of methods to assert that a is in the expected state. + + + + + Initializes a new instance of the class. + + + + + Asserts that a string is equal to another string. + + The expected string. + + + + Asserts that a string is exactly the same as another string, including the casing and any leading or trailing whitespace. + + The expected string. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string is exactly the same as another string, including any leading or trailing whitespace, with + the exception of the casing. + + + The string that the subject is expected to be equivalent to. + + + + + Asserts that a string is exactly the same as another string, including any leading or trailing whitespace, with + the exception of the casing. + + + The string that the subject is expected to be equivalent to. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string is not exactly the same as the specified , + including any leading or trailing whitespace, with the exception of the casing. + + The string that the subject is not expected to be equivalent to. + + + + Asserts that a string is not exactly the same as the specified , + including any leading or trailing whitespace, with the exception of the casing. + + The string that the subject is not expected to be equivalent to. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string matches a wildcard pattern. + + + The wildcard pattern with which the subject is matched, where * and ? have special meanings. + + + + + Asserts that a string matches a wildcard pattern. + + + The wildcard pattern with which the subject is matched, where * and ? have special meanings. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string does not match a wildcard pattern. + + + The wildcard pattern with which the subject is matched, where * and ? have special meanings. + + + + + Asserts that a string does not match a wildcard pattern. + + + The wildcard pattern with which the subject is matched, where * and ? have special meanings. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string matches a wildcard pattern. + + + The wildcard pattern with which the subject is matched, where * and ? have special meanings. + + + + + Asserts that a string matches a wildcard pattern. + + + The wildcard pattern with which the subject is matched, where * and ? have special meanings. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string does not match a wildcard pattern. + + + The wildcard pattern with which the subject is matched, where * and ? have special meanings. + + + + + Asserts that a string does not match a wildcard pattern. + + + The wildcard pattern with which the subject is matched, where * and ? have special meanings. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string starts exactly with the specified , + including the casing and any leading or trailing whitespace. + + The string that the subject is expected to start with. + + + + Asserts that a string starts exactly with the specified , + including the casing and any leading or trailing whitespace. + + The string that the subject is expected to start with. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string starts with the specified , + including any leading or trailing whitespace, with the exception of the casing. + + The string that the subject is expected to start with. + + + + Asserts that a string starts with the specified , + including any leading or trailing whitespace, with the exception of the casing. + + The string that the subject is expected to start with. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string ends exactly with the specified , + including the casing and any leading or trailing whitespace. + + The string that the subject is expected to end with. + + + + Asserts that a string ends exactly with the specified , + including the casing and any leading or trailing whitespace. + + The string that the subject is expected to end with. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string ends with the specified , + including any leading or trailing whitespace, with the exception of the casing. + + The string that the subject is expected to end with. + + + + Asserts that a string ends with the specified , + including any leading or trailing whitespace, with the exception of the casing. + + The string that the subject is expected to end with. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string contains another (fragment of a) string. + + + The (fragement of a) string that the current string should contain. + + + + + Asserts that a string contains another (fragment of a) string. + + + The (fragement of a) string that the current string should contain. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string contains the specified , + including any leading or trailing whitespace, with the exception of the casing. + + The string that the subject is expected to contain. + + + + Asserts that a string contains the specified , + including any leading or trailing whitespace, with the exception of the casing. + + The string that the subject is expected to contain. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string does not contain another (fragment of a) string. + + + The (fragement of a) string that the current string should not contain. + + + + + Asserts that a string does not contain another (fragment of a) string. + + + The (fragement of a) string that the current string should not contain. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string does not contain the specified string, + including any leading or trailing whitespace, with the exception of the casing. + + The string that the subject is not expected to contain. + + + + Asserts that a string does not contain the specified string, + including any leading or trailing whitespace, with the exception of the casing. + + The string that the subject is not expected to contain. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string is . + + + + + Asserts that a string is . + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string is not . + + + + + Asserts that a string is not . + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string has the specified length. + + The expected length of the string + + + + Asserts that a string has the specified length. + + The expected length of the string + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string is null. + + + + + Asserts that a string is null. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string is not null. + + + + + Asserts that a string is not null. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that a string is neither null nor . + + + + + Asserts that a string is neither null nor . + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that a string is either null or . + + + + + Asserts that a string is either null or . + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that a string is neither null nor nor white space + + + + + Asserts that a string is neither null nor nor white space + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that a string is either null or or white space + + + + + Asserts that a string is either null or or white space + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Gets the object which value is being asserted. + + + + + Dedicated class for comparing two strings and generating consistent error messages. + + + + + Gets or sets a value indicating whether the subject should not match the pattern. + + + + + Gets or sets a value indicating whether the matching process should ignore any casing difference. + + + + + Contains a number of methods to assert that two objects differ in the expected way. + + + You can use the and for a more fluent + way of specifying a or a . + + + + + Asserts that a occurs a specified amount of time before another . + + + The to compare the subject with. + + + + + Asserts that a occurs a specified amount of time before another . + + + The to compare the subject with. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that a occurs a specified amount of time after another . + + + The to compare the subject with. + + + + + Asserts that a occurs a specified amount of time after another . + + + The to compare the subject with. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Provides the logic and the display text for a . + + + + + Contains a number of methods to assert that a meets certain expectations. + + + + + Initializes a new instance of the class. + + + + + Asserts that the current type is equal to the specified type. + + + + + Asserts that the current type is equal to the specified type. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current type is equal to the specified type. + + The expected type + + + + Asserts that the current type is equal to the specified type. + + The expected type + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Creates an error message in case the specifed type differs from the + type. + + + An empty if the two specified types are the same, or an error message that describes that + the two specified types are not the same. + + + + + Asserts that the current type is not equal to the specified type. + + + + + Asserts that the current type is not equal to the specified type. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current type is not equal to the specified type. + + The unexpected type + + + + Asserts that the current type is not equal to the specified type. + + The unexpected type + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the is decorated with the specified . + + + + + Asserts that the is decorated with the specified . + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Gets the object which value is being asserted. + + + + + Extension methods for getting method and property selectors for a type. + + + + + Returns the types that are visible outside the specified . + + + + + Returns a method selector for the current . + + + + + Returns a method selector for the current . + + + + + Returns a property selector for the current . + + + + + Returns a property selector for the current . + + + + + Allows for fluent filtering a list of types. + + + + + Determines whether a type is a subclass of another type, but NOT the same type. + + + + + Determines whether a type implements an interface (but is not the interface itself). + + + + + Determines whether a type is decorated with a particular attribute. + + + + + Determines whether the namespace of type is exactly . + + + + + Determines whether the namespace of type is starts with . + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + 1 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + 2 + + + + Contains a number of methods to assert that an is in the expected state. + + + + + Initializes a new instance of the class. + + + + + Asserts that the current equals the attribute. + + The expected attribute + + + + Asserts that the current equals the attribute. + + The expected attribute + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current does not equal the attribute, + using its implementation. + + The unexpected attribute + + + + Asserts that the current does not equal the attribute, + using its implementation. + + The unexpected attribute + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the is null. + + + + + Asserts that the is null. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that the is not null. + + + + + Asserts that the is not null. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that the current has the specified value. + + The expected value + + + + Asserts that the current has the specified value. + + The expected value + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Gets the object which value is being asserted. + + + + + Contains a number of methods to assert that an is in the expected state. + + + + + Initializes a new instance of the class. + + + + + Asserts that the current equals the document, + using its implementation. + + The expected document + + + + Asserts that the current equals the document, + using its implementation. + + The expected document + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current does not equal the document, + using its implementation. + + The unexpected document + + + + Asserts that the current does not equal the document, + using its implementation. + + The unexpected document + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the is null. + + + + + Asserts that the is null. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that the is not null. + + + + + Asserts that the is not null. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that the current has a root element with the specified + name. + + The name of the expected root element of the current document. + + + + Asserts that the current has a root element with the specified + name. + + The name of the expected root element of the current document. + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the element of the current has a direct + child element with the specified name. + + + The name of the expected child element of the current document's Root element. + + + + + Asserts that the element of the current has a direct + child element with the specified name. + + + The name of the expected child element of the current document's Root element. + + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Gets the object which value is being asserted. + + + + + Contains a number of methods to assert that an is in the expected state. + + + + + Initializes a new instance of the class. + + + + + Asserts that the current equals the element. + + The expected element + + + + Asserts that the current equals the element. + + The expected element + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current does not equal the element, + using its implementation. + + The unexpected element + + + + Asserts that the current does not equal the element, + using its implementation. + + The unexpected element + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the is null. + + + + + Asserts that the is null. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that the is not null. + + + + + Asserts that the is not null. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Asserts that the current has an attribute with the specified + and . + + The name of the expected attribute + The value of the expected attribute + + + + Asserts that the current has an attribute with the specified + and . + + The name of the expected attribute + The value of the expected attribute + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Asserts that the current has a direct child element with the specified + name. + + The name of the expected child element + + + + Asserts that the current has a direct child element with the specified + name. + + The name of the expected child element + + A formatted phrase as is supported by explaining why the assertion + is needed. If the phrase does not start with the word because, it is prepended automatically. + + + Zero or more objects to format using the placeholders in . + + + + + Gets the object which value is being asserted. + + + + + Finds the first index at which the does not match the + string anymore, including the exact casing. + + + + + Finds the first index at which the does not match the + string anymore, accounting for the specified . + + + + + Gets the quoted three characters at the specified index of a string, including the index itself. + + + + + Replaces all characters that might conflict with formatting placeholders and newlines with their escaped counterparts. + + + + + Replaces all characters that might conflict with formatting placeholders and newlines with their escaped counterparts. + + + + + Extension methods on to allow for a more fluent way of specifying a . + + + Instead of
+
+ new DateTime(2011, 3, 10)
+
+ you can write 3.March(2011)
+
+ Or even
+
+ 3.March(2011).At(09, 30) +
+ +
+ + + Returns a new value for the specified and + in the month January. + + + + + Returns a new value for the specified and + in the month February. + + + + + Returns a new value for the specified and + in the month March. + + + + + Returns a new value for the specified and + in the month April. + + + + + Returns a new value for the specified and + in the month May. + + + + + Returns a new value for the specified and + in the month June. + + + + + Returns a new value for the specified and + in the month July. + + + + + Returns a new value for the specified and + in the month August. + + + + + Returns a new value for the specified and + in the month September. + + + + + Returns a new value for the specified and + in the month October. + + + + + Returns a new value for the specified and + in the month November. + + + + + Returns a new value for the specified and + in the month December. + + + + + Returns a new value for the specified and . + + + + + Returns a new value for the specified and time with the specified + , and optionally . + + + + + Returns a new value that is the current before the + specified . + + + + + Returns a new value that is the current after the + specified . + + + + + Is thrown when the detects an object that was already processed. + + + + + Extension methods on to allow for a more fluent way of specifying a . + + + Instead of
+
+ TimeSpan.FromHours(12)
+
+ you can write
+
+ 12.Hours()
+
+ Or even
+
+ 12.Hours().And(30.Minutes()). +
+ +
+ + + Returns a based on a number of milliseconds. + + + + + Returns a based on a number of seconds. + + + + + Returns a based on a number of seconds, and add the specified + . + + + + + Returns a based on a number of minutes. + + + + + Returns a based on a number of minutes, and add the specified + . + + + + + Returns a based on a number of hours. + + + + + Returns a based on a number of hours, and add the specified + . + + + + + Returns a based on a number of days. + + + + + Returns a based on a number of days, and add the specified + . + + + + + Convenience method for chaining multiple calls to the methods provided by this class. + + + 23.Hours().And(59.Minutes()) + + + + + Simple class for detecting an attempt to process an object that were already processed. + + + + + Tracks the specified reference but throws an + if that reference was already tracked. + + + + + Provides extension methods for monitoring and querying events. + + + + + Starts monitoring an object for its events. + + Thrown if eventSource is Null. + + + + Asserts that an object has raised the event for a particular property. + + + You must call on the same object prior to this call so that Fluent Assertions can + subscribe for the events of the object. + + + + + Asserts that an object has raised the event for a particular property. + + The object exposing the event. + + A lambda expression referring to the property for which the property changed event should have been raised. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + You must call on the same object prior to this call so that Fluent Assertions can + subscribe for the events of the object. + + + + + Asserts that an object has not raised the event for a particular property. + + + You must call on the same object prior to this call so that Fluent Assertions can + subscribe for the events of the object. + + + + + Asserts that an object has not raised the event for a particular property. + + The object exposing the event. + + A lambda expression referring to the property for which the property changed event should have been raised. + + + A formatted phrase explaining why the assertion should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + You must call on the same object prior to this call so that Fluent Assertions can + subscribe for the events of the object. + + + + + Asserts that all occurences of the event originated from the . + + + + + Asserts that at least one occurrence of the event had an object matching a predicate. + + + + + Records activity for a single event. + + + + + Records raised events for one event on one object + + + + + Store information about a raised event + + Parameters the event was raised with + + + + The object events are recorded from + + + + + The name of the event that's recorded + + + + + + The object events are recorded from + The name of the event that's recorded + + + + Enumerate raised events + + + + + Enumerate raised events + + + + + + Called by the auto-generated IL, to record information about a raised event. + + + + + The object events are recorded from + + + + + The name of the event that's recorded + + + + + Simple dictionary that uses a to the event source as the key. + This should ensure the Garbage Collector can still clean-up the event source object. + + + + + This class is used to store data about an intercepted event + + + + + Default constructor stores the parameters the event was raised with + + + + + Parameters for the event + + + + + Helper class for verifying a condition and/or throwing a test harness specific exception representing an assertion failure. + + + + + Asserts that the supplied is met. + + The condition to assert. + + The message that will be used in the exception. This should describe what was expected and why. This message + can contain the following three placeholders:
+ + {0} = the expected value + {1} = the actual value + {2} = a reason explaining the expectations +
+ + + The expected value, or null if there is no explicit expected value. + + The actual value, or null if there is no explicit actual value. + Should describe the reason for the expectation. + Optional args for formatting placeholders in the . +
+ + + Asserts that the supplied is met. + + The condition to assert. + + The message that will be used in the exception. This should describe what was expected and why. This message + can contain the following three placeholders:
+ + {0} = the expected value + {1} = the actual value + {2} = a reason explaining the expectations +
+ + + The expected value, or null if there is no explicit expected value. + + The actual value, or null if there is no explicit actual value. + Should describe the reason for the expectation. + Optional args for formatting placeholders in the . +
+ + + Handles an assertion failure. + + + The message that will be used in the exception. This should describe what was expected and why. This message + can contain the following three placeholders:
+ + {0} = the expected value + {1} = the actual value + {2} = a reason explaining the expectations +
+ Any additional placeholders are allowed and will be satisfied using the . + + + The expected value, or null if there is no explicit expected value. + + The actual value, or null if there is no explicit actual value. + Should describe the reason for the expectation. + Optional args for formatting placeholders in the . + + Optional arguments to satisfy any additional placeholders in the + +
+ + + Gets an object that wraps and executes a conditional or unconditional verification. + + + + + Indicates whether the current can handle the specified . + + The value for which to create a . + + true if the current can handle the specified value; otherwise, false. + + + + + Returns a that represents this instance. + + The value for which to create a . + + An object that is passed through recursive calls and which should be used to detect circular references + in the object graph that is being converted to a string representation. + + The level of nesting for the supplied value. This is used for indenting the format string for objects that have + no override. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The value for which to create a . + + An object that is passed through recursive calls and which should be used to detect circular references + in the object graph that is being converted to a string representation. + + The level of nesting for the supplied value. This is used for indenting the format string for objects that have + no override. + + + A that represents this instance. + + + + + Determines whether this instance can handle the specified value. + + The value. + + true if this instance can handle the specified value; otherwise, false. + + + + + Returns a that represents this instance. + + The value for which to create a . + + An object that is passed through recursive calls and which should be used to detect circular references + in the object graph that is being converted to a string representation. + + The level of nesting for the supplied value. This is used for indenting the format string for objects that have + no override. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The value for which to create a . + + An object that is passed through recursive calls and which should be used to detect circular references + in the object graph that is being converted to a string representation. + + The level of nesting for the supplied value. This is used for indenting the format string for objects that have + no override. + + + A that represents this instance. + + + + + Provides services for formatting an object being used in an assertion in a human readable format. + + + + + A list of objects responsible for formatting the objects represented by placeholders. + + + + + Returns a human-readable representation of a particular object. + + The value for which to create a . + + + The level of nesting for the supplied value. This is used for indenting the format string for objects that have + no override. + + + A that represents this instance. + + + + + Returns a human-readable representation of a particular object that starts on a new line. + + The value for which to create a . + + The level of nesting for the supplied value. This is used for indenting the format string for objects that have + no override. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The value for which to create a . + + An object that is passed through recursive calls and which should be used to detect circular references + in the object graph that is being converted to a string representation. + + The level of nesting for the supplied value. This is used for indenting the format string for objects that have + no override. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The value for which to create a . + + An object that is passed through recursive calls and which should be used to detect circular references + in the object graph that is being converted to a string representation. + + The level of nesting for the supplied value. This is used for indenting the format string for objects that have + no override. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The value for which to create a . + + An object that is passed through recursive calls and which should be used to detect circular references + in the object graph that is being converted to a string representation. + + The level of nesting for the supplied value. This is used for indenting the format string for objects that have + no override. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The value for which to create a . + + An object that is passed through recursive calls and which should be used to detect circular references + in the object graph that is being converted to a string representation. + + The level of nesting for the supplied value. This is used for indenting the format string for objects that have + no override. + + + A that represents this instance. + + + + + Provides a fluent API for verifying an arbitrary condition. + + + + + Represents the phrase that can be used in as a placeholder for the reason of an assertion. + + + + + Initializes a new instance of the class. + + + + + Gets the name or identifier of the current subject, or a default value if the subject is not known. + + + + + Specify the condition that must be satisfied. + + If true the verification will be succesful. + + + + Specify a predicate that with the condition that must be satisfied. + + + + + Specify the reason why you expect the condition to be true. + + + A formatted phrase explaining why the condition should be satisfied. If the phrase does not + start with the word because, it is prepended to the message. + + + Zero or more values to use for filling in any compatible placeholders. + + + + + Define the failure message for the verification. + + + If the contains the text "{reason}", this will be replaced by the reason as + defined through . Only 10 are supported in combination with + a {reason}. + + The format string that represents the failure message. + Optional arguments for the + + + + Indicates that every argument passed into is displayed on a separate line. + + + + + Gets or sets the name of the subject for the next verification. + + +
+
diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/Libs/FluentAssertions.dll Binary file SilverlightValidation/Libs/FluentAssertions.dll has changed diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/Libs/FluentAssertions.pdb Binary file SilverlightValidation/Libs/FluentAssertions.pdb has changed diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/Libs/FluentAssertions.xml --- a/SilverlightValidation/Libs/FluentAssertions.xml Sun May 06 13:00:46 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5476 +0,0 @@ - - - - FluentAssertions - - - - - Initializes a new instance of the class. - - - - - Contains extension methods for custom assertions in unit tests. - - - - - Invokes the specified action on an subject so that you can chain it with any of the ShouldThrow or ShouldNotThrow - overloads. - - - - - Provides methods for asserting the execution time of a method or property. - - The object that exposes the method or property. - A reference to the method or property to measure the execution time of. - - Returns an object for asserting that the execution time matches certain conditions. - - - - - Provides methods for asserting the execution time of a method or property. - - A reference to the method or property to measure the execution time of. - - Returns an object for asserting that the execution time matches certain conditions. - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current . - - - - - Asserts that the throws an exception. - - - The type of the exception it should throw. - - - Returns an object that allows asserting additional members of the thrown exception. - - - - - Asserts that the throws an exception. - - A reference to the method or property. - - The type of the exception it should throw. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - Returns an object that allows asserting additional members of the thrown exception. - - - - - Asserts that the does not throw a particular exception. - - - The type of the exception it should not throw. Any other exceptions are ignored and will satisfy the assertion. - - - - - Asserts that the does not throw a particular exception. - - The current method or property. - - The type of the exception it should not throw. Any other exceptions are ignored and will satisfy the assertion. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that the does not throw any exception at all. - - - - - Asserts that the does not throw any exception at all. - - The current method or property. - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Forces enumerating a collection. Should be used to assert that a method that uses the - yield keyword throws a particular exception. - - - - - Forces enumerating a collection. Should be used to assert that a method that uses the - yield keyword throws a particular exception. - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current nullable . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current nullable . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current nullable . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current nullable . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current nullable . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current nullable . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current nullable . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current nullable . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current nullable . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current . - - - - - Returns an object that can be used to assert the - current nullable . - - - - - Asserts that the properties of an object matches those of another object. - - - - - Returns a object that can be used to assert the - current . - - - - - Returns a object that can be used to assert the methods returned by the - current . - - - - - - Returns a object that can be used to assert the properties returned by the - current . - - - - - - Safely casts the specified object to the type specified through . - - - Has been introduced to allow casting objects without breaking the fluent API. - - - - - - Contains a number of methods to assert that an yields the expected result. - - - - - Asserts that the current throws an exception of type . - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current does not throw an exception of type . - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current does not throw any exception. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Gets the that is being asserted. - - - - - Contains a number of methods to assert that a is in the expected state. - - - - - Asserts that the value is false. - - - - - Asserts that the value is false. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the value is true. - - - - - Asserts that the value is true. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the value is equal to the specified value. - - The expected value - - - - Asserts that the value is equal to the specified value. - - The expected value - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Gets the object which value is being asserted. - - - - - Contains a number of methods to assert that an is in the expected state. - - - - - Contains a number of methods to assert that a reference type object is in the expected state. - - - - - Asserts that the object is of the specified type . - - The expected type of the object. - - - - Asserts that the object is of the specified type . - - The expected type of the object. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the object is assignable to a variable of type . - - The type to which the object should be assignable. - An which can be used to chain assertions. - - - - Asserts that the object is assignable to a variable of type . - - The type to which the object should be assignable. - The reason why the object should be assignable to the type. - The parameters used when formatting the . - An which can be used to chain assertions. - - - - Asserts that the is statisfied. - - The predicate which must be satisfied by the . - An which can be used to chain assertions. - - - - Asserts that the is satisfied. - - The predicate which must be statisfied by the . - The reason why the predicate should be satisfied. - The parameters used when formatting the . - An which can be used to chain assertions. - - - - Asserts that the is satisfied. - - The predicate which must be statisfied by the . - An which can be used to chain assertions. - - - - Asserts that the is satisfied. - - The predicate which must be statisfied by the . - The reason why the predicate should be satisfied. - The parameters used when formatting the . - An which can be used to chain assertions. - - - - Gets the object which value is being asserted. - - - - - Asserts that the number of items in the collection matches the supplied amount. - - The expected number of items in the collection. - - - - Asserts that the number of items in the collection matches the supplied amount. - - The expected number of items in the collection. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the number of items in the collection matches a condition stated by the . - - A predicate that yields the number of items that is expected to be in the collection. - - - - Asserts that the number of items in the collection matches a condition stated by the . - - A predicate that yields the number of items that is expected to be in the collection. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the collection does not contain any items. - - - - - Asserts that the collection does not contain any items. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the collection contains at least 1 item. - - - - - Asserts that the collection contains at least 1 item. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the collection does not contain any duplicate items. - - - - - Asserts that the collection does not contain any duplicate items. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the collection does not contain any null items. - - - - - Asserts that the collection does not contain any null items. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Expects the current collection to contain all the same elements in the same order as the collection identified by - . Elements are compared using their . - - An with the expected items. - - - - Expects the current collection to contain all the same elements in the same order as the collection identified by - . Elements are compared using their . - - A params array with the expected elements. - - - - Expects the current collection to contain all the same elements in the same order as the collection identified by - . Elements are compared using their . - - An with the expected elements. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Expects the current collection not to contain all the same elements in the same order as the collection identified by - . Elements are compared using their . - - An with the elements that are not expected. - - - - Expects the current collection not to contain all the same elements in the same order as the collection identified by - . Elements are compared using their . - - An with the elements that are not expected. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Expects the current collection to contain all elements of the collection identified by , - regardless of the order. Elements are compared using their . - - An with the expected elements. - - - - Expects the current collection to contain all elements of the collection identified by , - regardless of the order. Elements are compared using their . - - A params array with the expected elements. - - - - Expects the current collection to contain all elements of the collection identified by , - regardless of the order. Elements are compared using their . - - An with the expected elements. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Expects the current collection not to contain all elements of the collection identified by , - regardless of the order. Elements are compared using their . - - An with the unexpected elements. - - - - Expects the current collection not to contain all elements of the collection identified by , - regardless of the order. Elements are compared using their . - - An with the unexpected elements. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current collection only contains items that are assignable to the type . - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Expects the current collection to contain the specified elements in any order. Elements are compared - using their implementation. - - An with the expected elements. - - - - Expects the current collection to contain the specified elements in any order. Elements are compared - using their implementation. - - An with the expected elements. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Expects the current collection to contain the specified elements in the exact same order. Elements are compared - using their implementation. - - An with the expected elements. - - - - Expects the current collection to contain the specified elements in the exact same order. Elements are compared - using their implementation. - - An with the expected elements. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the collection is a subset of the . - - An with the expected superset. - - - - Asserts that the collection is a subset of the . - - An with the expected superset. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the collection is not a subset of the . - - An with the unexpected superset. - - - - Asserts that the collection is not a subset of the . - - An with the unexpected superset. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Assert that the current collection has the same number of elements as . - - The other collection with the same expected number of elements - - - - Assert that the current collection has the same number of elements as . - - The other collection with the same expected number of elements - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current collection has not been initialized yet with an actual collection. - - - - - Asserts that the current collection has not been initialized yet with an actual collection. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current collection has been initialized with an actual collection. - - - - - Asserts that the current collection has been initialized with an actual collection. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current collection has the supplied at the - supplied . - - The index where the element is expected - The expected element - - - - Asserts that the current collection has the supplied at the - supplied . - - The index where the element is expected - The expected element - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current collection only contains items that are assignable to the type . - - - - - Asserts that the current collection does not contain the supplied item. - - The element that is not expected to be in the collection - - - - Asserts that the current collection does not contain the supplied item. - - The element that is not expected to be in the collection - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Contains a number of methods to assert that an is in the expected state. - - - - - Asserts that the subject is considered equal to another object according to the implementation of . - - - The object to pass to the subject's method. - - - - - Asserts that the subject is considered equal to another object according to the implementation of . - - - The object to pass to the subject's method. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the subject is not equal to another object according to its implementation of . - - - The object to pass to the subject's method. - - - - - Asserts that the subject is not equal to another object according to its implementation of . - - - The object to pass to the subject's method. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the subject is less than another object according to its implementation of . - - - The object to pass to the subject's method. - - - - - Asserts that the subject is less than another object according to its implementation of . - - - The object to pass to the subject's method. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the subject is less than or equal to another object according to its implementation of . - - - The object to pass to the subject's method. - - - - - Asserts that the subject is less than or equal to another object according to its implementation of . - - - The object to pass to the subject's method. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the subject is greater than another object according to its implementation of . - - - The object to pass to the subject's method. - - - - - Asserts that the subject is greater than another object according to its implementation of . - - - The object to pass to the subject's method. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the subject is greater than or equal to another object according to its implementation of . - - - The object to pass to the subject's method. - - - - - Asserts that the subject is greater than or equal to another object according to its implementation of . - - - The object to pass to the subject's method. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a value is within a range. - - - Where the range is continuous or incremental depends on the actual type of the value. - - - The minimum valid value of the range. - - - The maximum valid value of the range. - - - - - Asserts that a value is within a range. - - - Where the range is continuous or incremental depends on the actual type of the value. - - - The minimum valid value of the range. - - - The maximum valid value of the range. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a nullable numeric value is not null. - - - - - Asserts that a nullable numeric value is not null. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a nullable numeric value is null. - - - - - Asserts that a nullable numeric value is null. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Gets the object which value is being asserted. - - - - - Defines the way compares the expected exception - message with the actual one. - - - - - The message must match exactly, including the casing of the characters. - - - - - The message must match except for the casing of the characters. - - - - - The message must start with the exact text, including the casing of the characters.. - - - - - The message must start with the text except for the casing of the characters. - - - - - The message must contain the exact text. - - - - - The message must contain the text except for the casing of the characters. - - - - - The message must match a wildcard pattern consisting of ordinary characters as well as * and ?. - - - - - Indication of how cyclic references should be handled when validating equality of nested properties. - - - - - Cyclic references will be ignored. - - - - - Cyclic references will result in an exception. - - - - - Contains a number of methods to assert that a is in the expected state. - - - You can use the for a more fluent way of specifying a . - - - - - Asserts that the current is exactly equal to the value. - - - - - Asserts that the current is exactly equal to the value. - - The expected value - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current is not equal to the value. - - The unexpected value - - - - Asserts that the current is not equal to the value. - - The unexpected value - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current is before the specified value. - - The that the current value is expected to be before. - - - - Asserts that the current is before the specified value. - - The that the current value is expected to be before. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current is either on, or before the specified value. - - The that the current value is expected to be on or before. - - - - Asserts that the current is either on, or before the specified value. - - The that the current value is expected to be on or before. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current is after the specified value. - - The that the current value is expected to be after. - - - - Asserts that the current is after the specified value. - - The that the current value is expected to be after. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current is either on, or after the specified value. - - The that the current value is expected to be on or after. - - - - Asserts that the current is either on, or after the specified value. - - The that the current value is expected to be on or after. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current has the year. - - The expected year of the current value. - - - - Asserts that the current has the year. - - The expected year of the current value. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current has the month. - - The expected month of the current value. - - - - Asserts that the current has the month. - - The expected month of the current value. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current has the day. - - The expected day of the current value. - - - - Asserts that the current has the day. - - The expected day of the current value. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current has the hour. - - The expected hour of the current value. - - - - Asserts that the current has the hour. - - The expected hour of the current value. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current has the minute. - - The expected minutes of the current value. - - - - Asserts that the current has the minute. - - The expected minutes of the current value. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current has the second. - - The expected seconds of the current value. - - - - Asserts that the current has the second. - - The expected seconds of the current value. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Returns a object that can be used to assert that the current - exceeds the specified compared to another . - - - The amount of time that the current should exceed compared to another . - - - - - Returns a object that can be used to assert that the current - is equal to or exceeds the specified compared to another . - - - The amount of time that the current should be equal or exceed compared to - another . - - - - - Returns a object that can be used to assert that the current - differs exactly the specified compared to another . - - - The amount of time that the current should differ exactly compared to another . - - - - - Returns a object that can be used to assert that the current - is within the specified compared to another . - - - The amount of time that the current should be within another . - - - - - Returns a object that can be used to assert that the current - differs at maximum the specified compared to another . - - - The maximum amount of time that the current should differ compared to another . - - - - - Gets the object which value is being asserted. - - - - - Contains a number of methods to assert that an is in the correct state. - - - - - Asserts that the thrown exception has a message that exactly matches the - - - The expected message of the exception. - - - - - Asserts that the thrown exception has a message that matches - depending on the specified matching mode. - - - The expected message of the exception. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the thrown exception has a message that matches - depending on the specified matching mode. - - - The expected message of the exception. - - - Determines how the expected message is compared with the actual message. - - - - - Asserts that the thrown exception has a message that matches - depending on the specified matching mode. - - - The expected message of the exception. - - - Determines how the expected message is compared with the actual message. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the thrown exception contains an inner exception of type . - - The expected type of the inner exception. - - - - Asserts that the thrown exception contains an inner exception of type . - - The expected type of the inner exception. - The reason why the inner exception should be of the supplied type. - The parameters used when formatting the . - - - - Asserts that the thrown exception contains an inner exception with the . - - The expected message of the inner exception. - - - - Asserts that the thrown exception contains an inner exception with the . - - The expected message of the inner exception. - Determines how the expected message is compared with the actual message. - - - - Asserts that the thrown exception contains an inner exception with the . - - The expected message of the inner exception. - - The reason why the message of the inner exception should match . - - The parameters used when formatting the . - - - - Asserts that the thrown exception contains an inner exception with the . - - The expected message of the inner exception. - Determines how the expected message is compared with the actual message. - - The reason why the message of the inner exception should match . - - The parameters used when formatting the . - - - - Asserts that the exception matches a particular condition. - - - The condition that the exception must match. - - - - - Asserts that the exception matches a particular condition. - - - The condition that the exception must match. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Gets the exception object of the exception thrown. - - - - - Provides methods for asserting that the execution time of an satifies certain conditions. - - - - - Initializes a new instance of the class. - - The action of which the execution time must be asserted. - - - - Asserts that the execution time of the operation does not exceed a specified amount of time. - - - The maximum allowed duration. - - - - - Asserts that the execution time of the operation does not exceed a specified amount of time. - - - The maximum allowed duration. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Provides methods for asserting that the execution time of an object member satifies certain conditions. - - - - - - Initializes a new instance of the class. - - The object that exposes the method or property. - A reference to the method or property to measure the execution time of. - - - - Contains a number of extension methods for floating point . - - - - - Asserts a floating point value approximates another value as close as possible. - - The object that is being extended. - - The expected value to compare the actual value with. - - - The maximum amount of which the two values may differ. - - - - - Asserts a floating point value approximates another value as close as possible. - - The object that is being extended. - - The expected value to compare the actual value with. - - - The maximum amount of which the two values may differ. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts a floating point value approximates another value as close as possible. - - The object that is being extended. - - The expected value to compare the actual value with. - - - The maximum amount of which the two values may differ. - - - - - Asserts a floating point value approximates another value as close as possible. - - The object that is being extended. - - The expected value to compare the actual value with. - - - The maximum amount of which the two values may differ. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts a floating point value approximates another value as close as possible. - - The object that is being extended. - - The expected value to compare the actual value with. - - - The maximum amount of which the two values may differ. - - - - - Asserts a floating point value approximates another value as close as possible. - - The object that is being extended. - - The expected value to compare the actual value with. - - - The maximum amount of which the two values may differ. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts a floating point value approximates another value as close as possible. - - The object that is being extended. - - The expected value to compare the actual value with. - - - The maximum amount of which the two values may differ. - - - - - Asserts a floating point value approximates another value as close as possible. - - The object that is being extended. - - The expected value to compare the actual value with. - - - The maximum amount of which the two values may differ. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Contains a number of methods to assert that an is in the expected state. - - - - - Asserts that the collection contains the specified item. - - - - - Asserts that the collection contains the specified item. - - The expected item. - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that the collection contains some extra items in addition to the original items. - - An of expected items. - Additional items that are expected to be contained by the collection. - - - - Asserts that the collection contains at least one item that matches the predicate. - - A predicate to match the items in the collection against. - - - - Asserts that the collection contains at least one item that matches the predicate. - - A predicate to match the items in the collection against. - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that the collection only contains items that match a predicate. - - A predicate to match the items in the collection against. - - - - Asserts that the collection only contains items that match a predicate. - - A predicate to match the items in the collection against. - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that the collection does not contain any items that match the predicate. - - A predicate to match the items in the collection against. - - - - Asserts that the collection does not contain any items that match the predicate. - - A predicate to match the items in the collection against. - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Contains a number of methods to assert that an is in the expected state. - - - - - Asserts that the current dictionary has not been initialized yet with an actual dictionary. - - - - - Asserts that the current dictionary has not been initialized yet with an actual dictionary. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current dictionary has been initialized with an actual dictionary. - - - - - Asserts that the current dictionary has been initialized with an actual dictionary. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the number of items in the dictionary matches the supplied amount. - - The expected number of items. - - - - Asserts that the number of items in the dictionary matches the supplied amount. - - The expected number of items. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the number of items in the dictionary matches a condition stated by a predicate. - - The predicate which must be statisfied by the amount of items. - - - - Asserts that the number of items in the dictionary matches a condition stated by a predicate. - - The predicate which must be statisfied by the amount of items. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the dictionary does not contain any items. - - - - - Asserts that the dictionary does not contain any items. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the dictionary contains at least 1 item. - - - - - Asserts that the dictionary contains at least 1 item. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current dictionary contains all the same key-value pairs as the - specified dictionary. Keys and values are compared using - their implementation. - - The expected dictionary - - - - Asserts that the current dictionary contains all the same key-value pairs as the - specified dictionary. Keys and values are compared using - their implementation. - - The expected dictionary - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts the current dictionary not to contain all the same key-value pairs as the - specified dictionary. Keys and values are compared using - their implementation. - - The unexpected dictionary - - - - Asserts the current dictionary not to contain all the same key-value pairs as the - specified dictionary. Keys and values are compared using - their implementation. - - The unexpected dictionary - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the dictionary contains the specified key. Keys are compared using - their implementation. - - The expected key - - - - Asserts that the dictionary contains the specified key. Keys are compared using - their implementation. - - The expected key - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the dictionary contains all of the specified keys. Keys are compared using - their implementation. - - The expected keys - - - - Asserts that the dictionary contains all of the specified keys. Keys are compared using - their implementation. - - The expected keys - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current dictionary does not contain the specified key. - Keys are compared using their implementation. - - The unexpected key - - - - Asserts that the current dictionary does not contain the specified key. - Keys are compared using their implementation. - - The unexpected key - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the dictionary contains the specified value. Values are compared using - their implementation. - - The expected value - - - - Asserts that the dictionary contains the specified value. Values are compared using - their implementation. - - The expected value - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the dictionary contains all of the specified values. Values are compared using - their implementation. - - The expected values - - - - Asserts that the dictionary contains all of the specified values. Values are compared using - their implementation. - - The expected values - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current dictionary does not contain the specified value. - Values are compared using their implementation. - - The unexpected value - - - - Asserts that the current dictionary does not contain the specified value. - Values are compared using their implementation. - - The unexpected value - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current dictionary contains the specified . - Keys and values are compared using their implementation. - - The expected - - - - Asserts that the current dictionary contains the specified . - Keys and values are compared using their implementation. - - The expected - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current dictionary contains the specified for the supplied . Values are compared using their implementation. - - The key for which to validate the value - The value to validate - - - - Asserts that the current dictionary contains the specified for the supplied . Values are compared using their implementation. - - The key for which to validate the value - The value to validate - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current dictionary does not contain the specified . - Keys and values are compared using their implementation. - - The unexpected - - - - Asserts that the current dictionary does not contain the specified . - Keys and values are compared using their implementation. - - The unexpected - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current dictionary does not contain the specified for the - supplied . Values are compared using their implementation. - - The key for which to validate the value - The value to validate - - - - Asserts that the current dictionary does not contain the specified for the - supplied . Values are compared using their implementation. - - The key for which to validate the value - The value to validate - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Gets the object which value is being asserted. - - - - - Contains a number of methods to assert that a is in the correct state. - - - - - Asserts that the is . - - - - - Asserts that the is . - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the is not . - - - - - Asserts that the is not . - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the is equal to the GUID. - - The expected value to compare the actual value with. - - - - Asserts that the is equal to the GUID. - - The expected value to compare the actual value with. - - - - Asserts that the is equal to the GUID. - - The expected value to compare the actual value with. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the is equal to the GUID. - - The expected value to compare the actual value with. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the is not equal to the GUID. - - The unexpected value to compare the actual value with. - - - - Asserts that the is not equal to the GUID. - - The unexpected value to compare the actual value with. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Gets the object which value is being asserted. - - - - - Contains a number of methods to assert that an integral number is in the correct state. - - - - - Contains a number of methods to assert that an is in the expected state. - - - - - Asserts that the numeric value is greater than or equal to zero. - - - - - Asserts that the numeric value is greater than or equal to zero. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the numeric value is less than zero. - - - - - Asserts that the numeric value is less than zero. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the numeric value is less than the specified value. - - The value to compare the current numeric value with. - - - - Asserts that the numeric value is less than the specified value. - - The value to compare the current numeric value with. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the numeric value is less than or equal to the specified value. - - The value to compare the current numeric value with. - - - - Asserts that the numeric value is less than or equal to the specified value. - - The value to compare the current numeric value with. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the numeric value is greater than the specified value. - - The value to compare the current numeric value with. - - - - Asserts that the numeric value is greater than the specified value. - - The value to compare the current numeric value with. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the numeric value is greater than or equal to the specified value. - - The value to compare the current numeric value with. - - - - Asserts that the numeric value is greater than or equal to the specified value. - - The value to compare the current numeric value with. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a value is within a range. - - - Where the range is continuous or incremental depends on the actual type of the value. - - - The minimum valid value of the range. - - - The maximum valid value of the range. - - - - - Asserts that a value is within a range. - - - Where the range is continuous or incremental depends on the actual type of the value. - - - The minimum valid value of the range. - - - The maximum valid value of the range. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the integral number value is exactly the same as the value. - - The expected value. - - - - Asserts that the integral number value is exactly the same as the value. - - The expected value. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the integral number value is not the same as the value. - - The unexpected value. - - - - Asserts that the integral number value is not the same as the value. - - The unexpected value. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Contains assertions for the objects returned by the parent . - - - - - Initializes a new instance of the class. - - The methods. - - - - Asserts that the selected methods are virtual. - - - - - Asserts that the selected methods are virtual. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the selected methods are decorated with the specified . - - - - - Asserts that the selected methods are decorated with the specified . - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Gets the object which value is being asserted. - - - - - Allows for fluent selection of methods of a type through reflection. - - - - - Initializes a new instance of the class. - - The type from which to select methods. - - - - Initializes a new instance of the class. - - The types from which to select methods. - - - - Only select the methods that return the specified type - - - - - Only select the methods that are decorated with an attribute of the specified type. - - - - - The resulting objects. - - - - - Determines whether the specified method has a special name (like properties and events). - - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - 1 - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - 2 - - - - Only select the methods that are public or internal. - - - - - Only select the methods without a return value - - - - - Contains a number of methods to assert that an is in the expected state. - - - - - Asserts that the current collection contains the specified object. Elements are compared - using their implementation. - - An object, or of objects that are expected to be in the collection. - - - - Asserts that the current collection contains the specified object. Elements are compared - using their implementation. - - An object, or of objects that are expected to be in the collection. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Contains a number of methods to assert that a nullable is in the expected state. - - - - - Asserts that a nullable boolean value is not null. - - - - - Asserts that a nullable boolean value is not null. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a nullable boolean value is null. - - - - - Asserts that a nullable boolean value is null. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the value is equal to the specified value. - - The expected value - - - - Asserts that the value is equal to the specified value. - - The expected value - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Contains a number of methods to assert that a nullable is in the expected state. - - - You can use the for a more fluent way of specifying a . - - - - - Asserts that a nullable value is not null. - - - - - Asserts that a nullable value is not null. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a nullable value is null. - - - - - Asserts that a nullable value is null. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the value is equal to the specified value. - - The expected value - - - - Asserts that the value is equal to the specified value. - - The expected value - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Contains a number of methods to assert that a nullable is in the expected state. - - - - - Asserts that a nullable value is not null. - - - - - Asserts that a nullable value is not null. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a nullable value is null. - - - - - Asserts that a nullable value is null. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the value is equal to the specified value. - - The expected value - - - - Asserts that the value is equal to the specified value. - - The expected value - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Contains a number of methods to assert that a nullable numeric value has the expected value. - - - - - Asserts that a nullable numeric value is not null. - - - - - Asserts that a nullable numeric value is not null. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a nullable numeric value is null. - - - - - Asserts that a nullable numeric value is null. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Contains a number of methods to assert that a nullable is in the expected state. - - - You can use the for a more fluent way of specifying a . - - - - - Contains a number of methods to assert that a nullable is in the expected state. - - - - - Asserts that the time difference of the current is greater than zero. - - - - - Asserts that the time difference of the current is greater than zero. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the time difference of the current is less than zero. - - - - - Asserts that the time difference of the current is less than zero. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the time difference of the current is equal to the - specified time. - - The expected time difference - - - - Asserts that the time difference of the current is equal to the - specified time. - - The expected time difference - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the time difference of the current is not equal to the - specified time. - - The unexpected time difference - - - - Asserts that the time difference of the current is not equal to the - specified time. - - The unexpected time difference - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the time difference of the current is less than the - specified time. - - The time difference to which the current value will be compared - - - - Asserts that the time difference of the current is less than the - specified time. - - The time difference to which the current value will be compared - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the time difference of the current is less than or equal to the - specified time. - - The time difference to which the current value will be compared - - - - Asserts that the time difference of the current is less than or equal to the - specified time. - - The time difference to which the current value will be compared - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the time difference of the current is greater than the - specified time. - - The time difference to which the current value will be compared - - - - Asserts that the time difference of the current is greater than the - specified time. - - The time difference to which the current value will be compared - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the time difference of the current is greater than or equal to the - specified time. - - The time difference to which the current value will be compared - - - - Asserts that the time difference of the current is greater than or equal to the - specified time. - - The time difference to which the current value will be compared - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Gets the object which value is being asserted. - - - - - Asserts that a nullable value is not null. - - - - - Asserts that a nullable value is not null. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a nullable value is null. - - - - - Asserts that a nullable value is null. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Contains a number of methods to assert that an is in the expected state. - - - - - Asserts that the value of an object equals another object when using it's method. - - The expected value - - - - Asserts that an object equals another object using its implementation. - - The expected value - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that an object does not equal another object using it's method. - - The unexpected value - - - - Asserts that an object does not equal another object using it's method. - - The unexpected value - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that an object reference refers to the exact same object as another object reference. - - The expected object - - - - Asserts that an object reference refers to the exact same object as another object reference. - - The expected object - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that an object reference refers to a different object than another object reference refers to. - - The unexpected object - - - - Asserts that an object reference refers to a different object than another object reference refers to. - - The unexpected object - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that the object is null. - - - - - Asserts that the object is null. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that the object is not null. - - - - - Asserts that the object is not null. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that an object can be serialized and deserialized using the binary serializer and that it stills retains - the values of all properties. - - - - - Asserts that an object can be serialized and deserialized using the binary serializer and that it stills retains - the values of all properties. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that an object can be serialized and deserialized using the XML serializer and that it stills retains - the values of all properties. - - - - - Asserts that an object can be serialized and deserialized using the XML serializer and that it stills retains - the values of all properties. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Provides methods for selecting one or more properties of an object and comparing them with another object. - - - - - Includes all properties of when comparing the subject with another object using . - - - - - Includes all properties of including those of the run-time type when comparing the subject - with another object using . - - - - - Includes all properties of when comparing the subject with another object using , - except those that the other object does not have. - - - - - Perform recursive property comparison of the child properties for objects that are of incompatible type. - - - - - - Includes all properties of when comparing the subject with another object using , - except those specified using a property expression. - - A single property expression to exclude. - Optional list of additional property expressions to exclude. - - - - Excludes the properties specified by the from the comparison. - - A single property expression to exclude. - Optional list of additional property expressions to exclude. - - - - Includes only those properties of when comparing the subject with another object using - that were specified using a property expression. - - A single property expression to include. - Optional list of additional property expressions to include. - - - - Asserts that the previously selected properties of have the same value as the equally named - properties of . - - The object to compare the current object with - - Property values are considered equal if, after converting them to the requested type, calling - returns true. - - - - - Asserts that the previously selected properties of have the same value as the equally named - properties of . - - The object to compare the current object with - - Property values are considered equal if, after converting them to the requested type, calling - returns true. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Gets the object which value is being asserted. - - - - - Is responsible for validating the equality of one or more properties of a subject with another object. - - - - - Contains the properties that should be included when comparing two objects. - - - - - Gets or sets a value indicating whether the validator will ignore properties from the - collection that the object doesn't have. - - - - - Gets or sets a value indicating whether it should continue comparing (collections of objects) that - the refers to. - - - - - Gets or sets a value indicating how cyclic references that are encountered while comparing (collections of) - objects should be handled. - - - - - Contains assertions for the objects returned by the parent . - - - - - Initializes a new instance of the class. - - The properties. - - - - Asserts that the selected properties are virtual. - - - - - Asserts that the selected properties are virtual. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the selected methods are decorated with the specified . - - - - - Asserts that the selected methods are decorated with the specified . - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Gets the object which value is being asserted. - - - - - Allows for fluent selection of properties of a type through reflection. - - - - - Initializes a new instance of the class. - - The type from which to select properties. - - - - Initializes a new instance of the class. - - The types from which to select properties. - - - - Only select the properties that are decorated with an attribute of the specified type. - - - - - Only select the properties that return the specified type - - - - - The resulting objects. - - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - 1 - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - 2 - - - - Only select the properties that have a public or internal getter. - - - - - Contains a number of methods to assert that a is in the expected state. - - - - - Initializes a new instance of the class. - - - - - Asserts that a string is equal to another string. - - The expected string. - - - - Asserts that a string is exactly the same as another string, including the casing and any leading or trailing whitespace. - - The expected string. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string is exactly the same as another string, including any leading or trailing whitespace, with - the exception of the casing. - - - The string that the subject is expected to be equivalent to. - - - - - Asserts that a string is exactly the same as another string, including any leading or trailing whitespace, with - the exception of the casing. - - - The string that the subject is expected to be equivalent to. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string is not exactly the same as the specified , - including any leading or trailing whitespace, with the exception of the casing. - - The string that the subject is not expected to be equivalent to. - - - - Asserts that a string is not exactly the same as the specified , - including any leading or trailing whitespace, with the exception of the casing. - - The string that the subject is not expected to be equivalent to. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string matches a wildcard pattern. - - - The wildcard pattern with which the subject is matched, where * and ? have special meanings. - - - - - Asserts that a string matches a wildcard pattern. - - - The wildcard pattern with which the subject is matched, where * and ? have special meanings. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string does not match a wildcard pattern. - - - The wildcard pattern with which the subject is matched, where * and ? have special meanings. - - - - - Asserts that a string does not match a wildcard pattern. - - - The wildcard pattern with which the subject is matched, where * and ? have special meanings. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string matches a wildcard pattern. - - - The wildcard pattern with which the subject is matched, where * and ? have special meanings. - - - - - Asserts that a string matches a wildcard pattern. - - - The wildcard pattern with which the subject is matched, where * and ? have special meanings. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string does not match a wildcard pattern. - - - The wildcard pattern with which the subject is matched, where * and ? have special meanings. - - - - - Asserts that a string does not match a wildcard pattern. - - - The wildcard pattern with which the subject is matched, where * and ? have special meanings. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string starts exactly with the specified , - including the casing and any leading or trailing whitespace. - - The string that the subject is expected to start with. - - - - Asserts that a string starts exactly with the specified , - including the casing and any leading or trailing whitespace. - - The string that the subject is expected to start with. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string starts with the specified , - including any leading or trailing whitespace, with the exception of the casing. - - The string that the subject is expected to start with. - - - - Asserts that a string starts with the specified , - including any leading or trailing whitespace, with the exception of the casing. - - The string that the subject is expected to start with. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string ends exactly with the specified , - including the casing and any leading or trailing whitespace. - - The string that the subject is expected to end with. - - - - Asserts that a string ends exactly with the specified , - including the casing and any leading or trailing whitespace. - - The string that the subject is expected to end with. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string ends with the specified , - including any leading or trailing whitespace, with the exception of the casing. - - The string that the subject is expected to end with. - - - - Asserts that a string ends with the specified , - including any leading or trailing whitespace, with the exception of the casing. - - The string that the subject is expected to end with. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string contains another (fragment of a) string. - - - The (fragement of a) string that the current string should contain. - - - - - Asserts that a string contains another (fragment of a) string. - - - The (fragement of a) string that the current string should contain. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string contains the specified , - including any leading or trailing whitespace, with the exception of the casing. - - The string that the subject is expected to contain. - - - - Asserts that a string contains the specified , - including any leading or trailing whitespace, with the exception of the casing. - - The string that the subject is expected to contain. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string does not contain another (fragment of a) string. - - - The (fragement of a) string that the current string should not contain. - - - - - Asserts that a string does not contain another (fragment of a) string. - - - The (fragement of a) string that the current string should not contain. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string does not contain the specified string, - including any leading or trailing whitespace, with the exception of the casing. - - The string that the subject is not expected to contain. - - - - Asserts that a string does not contain the specified string, - including any leading or trailing whitespace, with the exception of the casing. - - The string that the subject is not expected to contain. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string is . - - - - - Asserts that a string is . - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string is not . - - - - - Asserts that a string is not . - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string has the specified length. - - The expected length of the string - - - - Asserts that a string has the specified length. - - The expected length of the string - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string is null. - - - - - Asserts that a string is null. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string is not null. - - - - - Asserts that a string is not null. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that a string is neither null nor . - - - - - Asserts that a string is neither null nor . - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that a string is either null or . - - - - - Asserts that a string is either null or . - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that a string is neither null nor nor white space - - - - - Asserts that a string is neither null nor nor white space - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that a string is either null or or white space - - - - - Asserts that a string is either null or or white space - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Gets the object which value is being asserted. - - - - - Dedicated class for comparing two strings and generating consistent error messages. - - - - - Gets or sets a value indicating whether the subject should not match the pattern. - - - - - Gets or sets a value indicating whether the matching process should ignore any casing difference. - - - - - Contains a number of methods to assert that two objects differ in the expected way. - - - You can use the and for a more fluent - way of specifying a or a . - - - - - Asserts that a occurs a specified amount of time before another . - - - The to compare the subject with. - - - - - Asserts that a occurs a specified amount of time before another . - - - The to compare the subject with. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that a occurs a specified amount of time after another . - - - The to compare the subject with. - - - - - Asserts that a occurs a specified amount of time after another . - - - The to compare the subject with. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Provides the logic and the display text for a . - - - - - Contains a number of methods to assert that a meets certain expectations. - - - - - Initializes a new instance of the class. - - - - - Asserts that the current type is equal to the specified type. - - - - - Asserts that the current type is equal to the specified type. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current type is equal to the specified type. - - The expected type - - - - Asserts that the current type is equal to the specified type. - - The expected type - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Creates an error message in case the specifed type differs from the - type. - - - An empty if the two specified types are the same, or an error message that describes that - the two specified types are not the same. - - - - - Asserts that the current type is not equal to the specified type. - - - - - Asserts that the current type is not equal to the specified type. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current type is not equal to the specified type. - - The unexpected type - - - - Asserts that the current type is not equal to the specified type. - - The unexpected type - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the is decorated with the specified . - - - - - Asserts that the is decorated with the specified . - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Gets the object which value is being asserted. - - - - - Extension methods for getting method and property selectors for a type. - - - - - Returns the types that are visible outside the specified . - - - - - Returns a method selector for the current . - - - - - Returns a method selector for the current . - - - - - Returns a property selector for the current . - - - - - Returns a property selector for the current . - - - - - Allows for fluent filtering a list of types. - - - - - Determines whether a type is a subclass of another type, but NOT the same type. - - - - - Determines whether a type implements an interface (but is not the interface itself). - - - - - Determines whether a type is decorated with a particular attribute. - - - - - Determines whether the namespace of type is exactly . - - - - - Determines whether the namespace of type is starts with . - - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - 1 - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - 2 - - - - Contains a number of methods to assert that an is in the expected state. - - - - - Initializes a new instance of the class. - - - - - Asserts that the current equals the attribute. - - The expected attribute - - - - Asserts that the current equals the attribute. - - The expected attribute - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current does not equal the attribute, - using its implementation. - - The unexpected attribute - - - - Asserts that the current does not equal the attribute, - using its implementation. - - The unexpected attribute - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the is null. - - - - - Asserts that the is null. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that the is not null. - - - - - Asserts that the is not null. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that the current has the specified value. - - The expected value - - - - Asserts that the current has the specified value. - - The expected value - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Gets the object which value is being asserted. - - - - - Contains a number of methods to assert that an is in the expected state. - - - - - Initializes a new instance of the class. - - - - - Asserts that the current equals the document, - using its implementation. - - The expected document - - - - Asserts that the current equals the document, - using its implementation. - - The expected document - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current does not equal the document, - using its implementation. - - The unexpected document - - - - Asserts that the current does not equal the document, - using its implementation. - - The unexpected document - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the is null. - - - - - Asserts that the is null. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that the is not null. - - - - - Asserts that the is not null. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that the current has a root element with the specified - name. - - The name of the expected root element of the current document. - - - - Asserts that the current has a root element with the specified - name. - - The name of the expected root element of the current document. - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the element of the current has a direct - child element with the specified name. - - - The name of the expected child element of the current document's Root element. - - - - - Asserts that the element of the current has a direct - child element with the specified name. - - - The name of the expected child element of the current document's Root element. - - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Gets the object which value is being asserted. - - - - - Contains a number of methods to assert that an is in the expected state. - - - - - Initializes a new instance of the class. - - - - - Asserts that the current equals the element. - - The expected element - - - - Asserts that the current equals the element. - - The expected element - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current does not equal the element, - using its implementation. - - The unexpected element - - - - Asserts that the current does not equal the element, - using its implementation. - - The unexpected element - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the is null. - - - - - Asserts that the is null. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that the is not null. - - - - - Asserts that the is not null. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Asserts that the current has an attribute with the specified - and . - - The name of the expected attribute - The value of the expected attribute - - - - Asserts that the current has an attribute with the specified - and . - - The name of the expected attribute - The value of the expected attribute - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Asserts that the current has a direct child element with the specified - name. - - The name of the expected child element - - - - Asserts that the current has a direct child element with the specified - name. - - The name of the expected child element - - A formatted phrase as is supported by explaining why the assertion - is needed. If the phrase does not start with the word because, it is prepended automatically. - - - Zero or more objects to format using the placeholders in . - - - - - Gets the object which value is being asserted. - - - - - Finds the first index at which the does not match the - string anymore, including the exact casing. - - - - - Finds the first index at which the does not match the - string anymore, accounting for the specified . - - - - - Gets the quoted three characters at the specified index of a string, including the index itself. - - - - - Replaces all characters that might conflict with formatting placeholders and newlines with their escaped counterparts. - - - - - Replaces all characters that might conflict with formatting placeholders and newlines with their escaped counterparts. - - - - - Extension methods on to allow for a more fluent way of specifying a . - - - Instead of
-
- new DateTime(2011, 3, 10)
-
- you can write 3.March(2011)
-
- Or even
-
- 3.March(2011).At(09, 30) -
- -
- - - Returns a new value for the specified and - in the month January. - - - - - Returns a new value for the specified and - in the month February. - - - - - Returns a new value for the specified and - in the month March. - - - - - Returns a new value for the specified and - in the month April. - - - - - Returns a new value for the specified and - in the month May. - - - - - Returns a new value for the specified and - in the month June. - - - - - Returns a new value for the specified and - in the month July. - - - - - Returns a new value for the specified and - in the month August. - - - - - Returns a new value for the specified and - in the month September. - - - - - Returns a new value for the specified and - in the month October. - - - - - Returns a new value for the specified and - in the month November. - - - - - Returns a new value for the specified and - in the month December. - - - - - Returns a new value for the specified and . - - - - - Returns a new value for the specified and time with the specified - , and optionally . - - - - - Returns a new value that is the current before the - specified . - - - - - Returns a new value that is the current after the - specified . - - - - - Is thrown when the detects an object that was already processed. - - - - - Extension methods on to allow for a more fluent way of specifying a . - - - Instead of
-
- TimeSpan.FromHours(12)
-
- you can write
-
- 12.Hours()
-
- Or even
-
- 12.Hours().And(30.Minutes()). -
- -
- - - Returns a based on a number of milliseconds. - - - - - Returns a based on a number of seconds. - - - - - Returns a based on a number of seconds, and add the specified - . - - - - - Returns a based on a number of minutes. - - - - - Returns a based on a number of minutes, and add the specified - . - - - - - Returns a based on a number of hours. - - - - - Returns a based on a number of hours, and add the specified - . - - - - - Returns a based on a number of days. - - - - - Returns a based on a number of days, and add the specified - . - - - - - Convenience method for chaining multiple calls to the methods provided by this class. - - - 23.Hours().And(59.Minutes()) - - - - - Simple class for detecting an attempt to process an object that were already processed. - - - - - Tracks the specified reference but throws an - if that reference was already tracked. - - - - - Static methods that aid in generic event subscription - - - - - Generates an eventhandler for an event of type eventSignature that calls RegisterEvent on recorder - when invoked. - - - - - Finds the Return Type of a Delegate. - - - - - Returns an Array of Types that make up a delegate's parameter signature. - - - - - Returns an array of types appended with an EventRecorder reference at the beginning. - - - - - Returns T/F Dependent on a Type Being a Delegate. - - - - - Returns the MethodInfo for the Delegate's "Invoke" Method. - - - - - Provides extension methods for monitoring and querying events. - - - - - Starts monitoring an object for its events. - - Thrown if eventSource is Null. - - - - Asserts that an object has raised a particular event at least once. - - The object exposing the event. - The name of the event that should have been raised. - - - You must call on the same object prior to this call so that Fluent Assertions can - subscribe for the events of the object. - - - - - Asserts that an object has raised a particular event at least once. - - The object exposing the event. - - The name of the event that should have been raised. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - You must call on the same object prior to this call so that Fluent Assertions can - subscribe for the events of the object. - - - - - Asserts that an object has not raised a particular event. - - The object exposing the event. - - The name of the event that should not be raised. - - - You must call on the same object prior to this call so that Fluent Assertions can - subscribe for the events of the object. - - - - - Asserts that an object has not raised a particular event. - - The object exposing the event. - - The name of the event that should not be raised. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - You must call on the same object prior to this call so that Fluent Assertions can - subscribe for the events of the object. - - - - - Asserts that an object has raised the event for a particular property. - - - You must call on the same object prior to this call so that Fluent Assertions can - subscribe for the events of the object. - - - - - Asserts that an object has raised the event for a particular property. - - The object exposing the event. - - A lambda expression referring to the property for which the property changed event should have been raised. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - You must call on the same object prior to this call so that Fluent Assertions can - subscribe for the events of the object. - - - - - Asserts that an object has not raised the event for a particular property. - - - You must call on the same object prior to this call so that Fluent Assertions can - subscribe for the events of the object. - - - - - Asserts that an object has not raised the event for a particular property. - - The object exposing the event. - - A lambda expression referring to the property for which the property changed event should have been raised. - - - A formatted phrase explaining why the assertion should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - You must call on the same object prior to this call so that Fluent Assertions can - subscribe for the events of the object. - - - - - Asserts that all occurences of the event originated from the . - - - - - Asserts that at least one occurrence of the event had an object matching a predicate. - - - - - Records activity for a single event. - - - - - Records raised events for one event on one object - - - - - Store information about a raised event - - Parameters the event was raised with - - - - The object events are recorded from - - - - - The name of the event that's recorded - - - - - - The object events are recorded from - The name of the event that's recorded - - - - Enumerate raised events - - - - - Enumerate raised events - - - - - - Called by the auto-generated IL, to record information about a raised event. - - - - - The object events are recorded from - - - - - The name of the event that's recorded - - - - - Simple dictionary that uses a to the event source as the key. - This should ensure the Garbage Collector can still clean-up the event source object. - - - - - This class is used to store data about an intercepted event - - - - - Default constructor stores the parameters the event was raised with - - - - - Parameters for the event - - - - - Helper class for verifying a condition and/or throwing a test harness specific exception representing an assertion failure. - - - - - Asserts that the supplied is met. - - The condition to assert. - - The message that will be used in the exception. This should describe what was expected and why. This message - can contain the following three placeholders:
- - {0} = the expected value - {1} = the actual value - {2} = a reason explaining the expectations -
- - - The expected value, or null if there is no explicit expected value. - - The actual value, or null if there is no explicit actual value. - Should describe the reason for the expectation. - Optional args for formatting placeholders in the . -
- - - Asserts that the supplied is met. - - The condition to assert. - - The message that will be used in the exception. This should describe what was expected and why. This message - can contain the following three placeholders:
- - {0} = the expected value - {1} = the actual value - {2} = a reason explaining the expectations -
- - - The expected value, or null if there is no explicit expected value. - - The actual value, or null if there is no explicit actual value. - Should describe the reason for the expectation. - Optional args for formatting placeholders in the . -
- - - Handles an assertion failure. - - - The message that will be used in the exception. This should describe what was expected and why. This message - can contain the following three placeholders:
- - {0} = the expected value - {1} = the actual value - {2} = a reason explaining the expectations -
- Any additional placeholders are allowed and will be satisfied using the . - - - The expected value, or null if there is no explicit expected value. - - The actual value, or null if there is no explicit actual value. - Should describe the reason for the expectation. - Optional args for formatting placeholders in the . - - Optional arguments to satisfy any additional placeholders in the - -
- - - Gets an object that wraps and executes a conditional or unconditional verification. - - - - - Indicates whether the current can handle the specified . - - The value for which to create a . - - true if the current can handle the specified value; otherwise, false. - - - - - Returns a that represents this instance. - - The value for which to create a . - - An object that is passed through recursive calls and which should be used to detect circular references - in the object graph that is being converted to a string representation. - - The level of nesting for the supplied value. This is used for indenting the format string for objects that have - no override. - - - A that represents this instance. - - - - - Returns a that represents this instance. - - The value for which to create a . - - An object that is passed through recursive calls and which should be used to detect circular references - in the object graph that is being converted to a string representation. - - The level of nesting for the supplied value. This is used for indenting the format string for objects that have - no override. - - - A that represents this instance. - - - - - Determines whether this instance can handle the specified value. - - The value. - - true if this instance can handle the specified value; otherwise, false. - - - - - Returns a that represents this instance. - - The value for which to create a . - - An object that is passed through recursive calls and which should be used to detect circular references - in the object graph that is being converted to a string representation. - - The level of nesting for the supplied value. This is used for indenting the format string for objects that have - no override. - - - A that represents this instance. - - - - - Returns a that represents this instance. - - The value for which to create a . - - An object that is passed through recursive calls and which should be used to detect circular references - in the object graph that is being converted to a string representation. - - The level of nesting for the supplied value. This is used for indenting the format string for objects that have - no override. - - - A that represents this instance. - - - - - Provides services for formatting an object being used in an assertion in a human readable format. - - - - - A list of objects responsible for formatting the objects represented by placeholders. - - - - - Returns a human-readable representation of a particular object. - - The value for which to create a . - - - The level of nesting for the supplied value. This is used for indenting the format string for objects that have - no override. - - - A that represents this instance. - - - - - Returns a human-readable representation of a particular object that starts on a new line. - - The value for which to create a . - - The level of nesting for the supplied value. This is used for indenting the format string for objects that have - no override. - - - A that represents this instance. - - - - - Returns a that represents this instance. - - The value for which to create a . - - An object that is passed through recursive calls and which should be used to detect circular references - in the object graph that is being converted to a string representation. - - The level of nesting for the supplied value. This is used for indenting the format string for objects that have - no override. - - - A that represents this instance. - - - - - Returns a that represents this instance. - - The value for which to create a . - - An object that is passed through recursive calls and which should be used to detect circular references - in the object graph that is being converted to a string representation. - - The level of nesting for the supplied value. This is used for indenting the format string for objects that have - no override. - - - A that represents this instance. - - - - - Returns a that represents this instance. - - The value for which to create a . - - An object that is passed through recursive calls and which should be used to detect circular references - in the object graph that is being converted to a string representation. - - The level of nesting for the supplied value. This is used for indenting the format string for objects that have - no override. - - - A that represents this instance. - - - - - Returns a that represents this instance. - - The value for which to create a . - - An object that is passed through recursive calls and which should be used to detect circular references - in the object graph that is being converted to a string representation. - - The level of nesting for the supplied value. This is used for indenting the format string for objects that have - no override. - - - A that represents this instance. - - - - - Throws a generic exception in case no other test harness is detected. - - - - - Represents an abstraction of a particular test framework such as MSTest, nUnit, etc. - - - - - Throws a framework-specific exception to indicate a failing unit test. - - - - - Gets a value indicating whether the corresponding test framework is currently available. - - - - - Throws a framework-specific exception to indicate a failing unit test. - - - - - Gets a value indicating whether the corresponding test framework is currently available. - - - - - Provides a fluent API for verifying an arbitrary condition. - - - - - Represents the phrase that can be used in as a placeholder for the reason of an assertion. - - - - - Initializes a new instance of the class. - - - - - Gets the name or identifier of the current subject, or a default value if the subject is not known. - - - - - Specify the condition that must be satisfied. - - If true the verification will be succesful. - - - - Specify a predicate that with the condition that must be satisfied. - - - - - Specify the reason why you expect the condition to be true. - - - A formatted phrase explaining why the condition should be satisfied. If the phrase does not - start with the word because, it is prepended to the message. - - - Zero or more values to use for filling in any compatible placeholders. - - - - - Define the failure message for the verification. - - - If the contains the text "{reason}", this will be replaced by the reason as - defined through . Only 10 are supported in combination with - a {reason}. - - The format string that represents the failure message. - Optional arguments for the - - - - Indicates that every argument passed into is displayed on a separate line. - - - - - Gets or sets the name of the subject for the next verification. - - -
-
diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/Libs/Moq.Silverlight.dll Binary file SilverlightValidation/Libs/Moq.Silverlight.dll has changed diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/Libs/Moq.Silverlight.pdb Binary file SilverlightValidation/Libs/Moq.Silverlight.pdb has changed diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/Libs/Moq.Silverlight.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/Libs/Moq.Silverlight.xml Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,5101 @@ + + + + Moq.Silverlight + + + + + + + + + + + + + Options to customize the behavior of the mock. + + + + + Causes the mock to always throw + an exception for invocations that don't have a + corresponding setup. + + + + + Will never throw exceptions, returning default + values when necessary (null for reference types, + zero for value types or empty enumerables and arrays). + + + + + Default mock behavior, which equals . + + + + + Provides a mock implementation of . + + Any interface type can be used for mocking, but for classes, only abstract and virtual members can be mocked. + + The behavior of the mock with regards to the setups and the actual calls is determined + by the optional that can be passed to the + constructor. + + Type to mock, which can be an interface or a class. + The following example shows establishing setups with specific values + for method invocations: + + // Arrange + var order = new Order(TALISKER, 50); + var mock = new Mock<IWarehouse>(); + + mock.Setup(x => x.HasInventory(TALISKER, 50)).Returns(true); + + // Act + order.Fill(mock.Object); + + // Assert + Assert.True(order.IsFilled); + + The following example shows how to use the class + to specify conditions for arguments instead of specific values: + + // Arrange + var order = new Order(TALISKER, 50); + var mock = new Mock<IWarehouse>(); + + // shows how to expect a value within a range + mock.Setup(x => x.HasInventory( + It.IsAny<string>(), + It.IsInRange(0, 100, Range.Inclusive))) + .Returns(false); + + // shows how to throw for unexpected calls. + mock.Setup(x => x.Remove( + It.IsAny<string>(), + It.IsAny<int>())) + .Throws(new InvalidOperationException()); + + // Act + order.Fill(mock.Object); + + // Assert + Assert.False(order.IsFilled); + + + + + + Base class for mocks and static helper class with methods that + apply to mocked objects, such as to + retrieve a from an object instance. + + + + + Helper interface used to hide the base + members from the fluent API to make it much cleaner + in Visual Studio intellisense. + + + + + + + + + + + + + + + + + Initializes a new instance of the class. + + + + + Retrieves the mock object for the given object instance. + + Type of the mock to retrieve. Can be omitted as it's inferred + from the object instance passed in as the instance. + The instance of the mocked object.The mock associated with the mocked object. + The received instance + was not created by Moq. + + The following example shows how to add a new setup to an object + instance which is not the original but rather + the object associated with it: + + // Typed instance, not the mock, is retrieved from some test API. + HttpContextBase context = GetMockContext(); + + // context.Request is the typed object from the "real" API + // so in order to add a setup to it, we need to get + // the mock that "owns" it + Mock<HttpRequestBase> request = Mock.Get(context.Request); + mock.Setup(req => req.AppRelativeCurrentExecutionFilePath) + .Returns(tempUrl); + + + + + + Returns the mocked object value. + + + + + Verifies that all verifiable expectations have been met. + + This example sets up an expectation and marks it as verifiable. After + the mock is used, a Verify() call is issued on the mock + to ensure the method in the setup was invoked: + + var mock = new Mock<IWarehouse>(); + this.Setup(x => x.HasInventory(TALISKER, 50)).Verifiable().Returns(true); + ... + // other test code + ... + // Will throw if the test code has didn't call HasInventory. + this.Verify(); + + Not all verifiable expectations were met. + + + + Verifies all expectations regardless of whether they have + been flagged as verifiable. + + This example sets up an expectation without marking it as verifiable. After + the mock is used, a call is issued on the mock + to ensure that all expectations are met: + + var mock = new Mock<IWarehouse>(); + this.Setup(x => x.HasInventory(TALISKER, 50)).Returns(true); + ... + // other test code + ... + // Will throw if the test code has didn't call HasInventory, even + // that expectation was not marked as verifiable. + this.VerifyAll(); + + At least one expectation was not met. + + + + Gets the interceptor target for the given expression and root mock, + building the intermediate hierarchy of mock objects if necessary. + + + + + Raises the associated event with the given + event argument data. + + + + + Raises the associated event with the given + event argument data. + + + + + Adds an interface implementation to the mock, + allowing setups to be specified for it. + + This method can only be called before the first use + of the mock property, at which + point the runtime type has already been generated + and no more interfaces can be added to it. + + Also, must be an + interface and not a class, which must be specified + when creating the mock instead. + + + The mock type + has already been generated by accessing the property. + + The specified + is not an interface. + + The following example creates a mock for the main interface + and later adds to it to verify + it's called by the consumer code: + + var mock = new Mock<IProcessor>(); + mock.Setup(x => x.Execute("ping")); + + // add IDisposable interface + var disposable = mock.As<IDisposable>(); + disposable.Setup(d => d.Dispose()).Verifiable(); + + Type of interface to cast the mock to. + + + + + + + Creates an mock object of the indicated type. + + The type of the mocked object. + The mocked object created. + + + + Creates an mock object of the indicated type. + + The predicate with the specification of how the mocked object should behave. + The type of the mocked object. + The mocked object created. + + + + Behavior of the mock, according to the value set in the constructor. + + + + + Whether the base member virtual implementation will be called + for mocked classes if no setup is matched. Defaults to . + + + + + Specifies the behavior to use when returning default values for + unexpected invocations on loose mocks. + + + + + Gets the mocked object instance. + + + + + Retrieves the type of the mocked object, its generic type argument. + This is used in the auto-mocking of hierarchy access. + + + + + Specifies the class that will determine the default + value to return when invocations are made that + have no setups and need to return a default + value (for loose mocks). + + + + + Exposes the list of extra interfaces implemented by the mock. + + + + + Ctor invoked by AsTInterface exclusively. + + + + + Initializes an instance of the mock with default behavior. + + var mock = new Mock<IFormatProvider>(); + + + + + Initializes an instance of the mock with default behavior and with + the given constructor arguments for the class. (Only valid when is a class) + + The mock will try to find the best match constructor given the constructor arguments, and invoke that + to initialize the instance. This applies only for classes, not interfaces. + + var mock = new Mock<MyProvider>(someArgument, 25); + Optional constructor arguments if the mocked type is a class. + + + + Initializes an instance of the mock with the specified behavior. + + var mock = new Mock<IFormatProvider>(MockBehavior.Relaxed); + Behavior of the mock. + + + + Initializes an instance of the mock with a specific behavior with + the given constructor arguments for the class. + + The mock will try to find the best match constructor given the constructor arguments, and invoke that + to initialize the instance. This applies only to classes, not interfaces. + + var mock = new Mock<MyProvider>(someArgument, 25); + Behavior of the mock.Optional constructor arguments if the mocked type is a class. + + + + Returns the mocked object value. + + + + + Specifies a setup on the mocked type for a call to + to a void method. + + If more than one setup is specified for the same method or property, + the latest one wins and is the one that will be executed. + Lambda expression that specifies the expected method invocation. + + var mock = new Mock<IProcessor>(); + mock.Setup(x => x.Execute("ping")); + + + + + + Specifies a setup on the mocked type for a call to + to a value returning method. + Type of the return value. Typically omitted as it can be inferred from the expression. + If more than one setup is specified for the same method or property, + the latest one wins and is the one that will be executed. + Lambda expression that specifies the method invocation. + + mock.Setup(x => x.HasInventory("Talisker", 50)).Returns(true); + + + + + + Specifies a setup on the mocked type for a call to + to a property getter. + + If more than one setup is set for the same property getter, + the latest one wins and is the one that will be executed. + Type of the property. Typically omitted as it can be inferred from the expression.Lambda expression that specifies the property getter. + + mock.SetupGet(x => x.Suspended) + .Returns(true); + + + + + + Specifies a setup on the mocked type for a call to + to a property setter. + + If more than one setup is set for the same property setter, + the latest one wins and is the one that will be executed. + + This overloads allows the use of a callback already + typed for the property type. + + Type of the property. Typically omitted as it can be inferred from the expression.The Lambda expression that sets a property to a value. + + mock.SetupSet(x => x.Suspended = true); + + + + + + Specifies a setup on the mocked type for a call to + to a property setter. + + If more than one setup is set for the same property setter, + the latest one wins and is the one that will be executed. + Lambda expression that sets a property to a value. + + mock.SetupSet(x => x.Suspended = true); + + + + + + Specifies that the given property should have "property behavior", + meaning that setting its value will cause it to be saved and + later returned when the property is requested. (this is also + known as "stubbing"). + + Type of the property, inferred from the property + expression (does not need to be specified). + Property expression to stub. + If you have an interface with an int property Value, you might + stub it using the following straightforward call: + + var mock = new Mock<IHaveValue>(); + mock.Stub(v => v.Value); + + After the Stub call has been issued, setting and + retrieving the object value will behave as expected: + + IHaveValue v = mock.Object; + + v.Value = 5; + Assert.Equal(5, v.Value); + + + + + + Specifies that the given property should have "property behavior", + meaning that setting its value will cause it to be saved and + later returned when the property is requested. This overload + allows setting the initial value for the property. (this is also + known as "stubbing"). + + Type of the property, inferred from the property + expression (does not need to be specified). + Property expression to stub.Initial value for the property. + If you have an interface with an int property Value, you might + stub it using the following straightforward call: + + var mock = new Mock<IHaveValue>(); + mock.SetupProperty(v => v.Value, 5); + + After the SetupProperty call has been issued, setting and + retrieving the object value will behave as expected: + + IHaveValue v = mock.Object; + // Initial value was stored + Assert.Equal(5, v.Value); + + // New value set which changes the initial value + v.Value = 6; + Assert.Equal(6, v.Value); + + + + + + Specifies that the all properties on the mock should have "property behavior", + meaning that setting its value will cause it to be saved and + later returned when the property is requested. (this is also + known as "stubbing"). The default value for each property will be the + one generated as specified by the property for the mock. + + If the mock is set to , + the mocked default values will also get all properties setup recursively. + + + + + + + + Verifies that a specific invocation matching the given expression was performed on the mock. Use + in conjuntion with the default . + + This example assumes that the mock has been used, and later we want to verify that a given + invocation with specific parameters was performed: + + var mock = new Mock<IProcessor>(); + // exercise mock + //... + // Will throw if the test code didn't call Execute with a "ping" string argument. + mock.Verify(proc => proc.Execute("ping")); + + The invocation was not performed on the mock.Expression to verify. + + + + Verifies that a specific invocation matching the given expression was performed on the mock. Use + in conjuntion with the default . + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called. + + + + Verifies that a specific invocation matching the given expression was performed on the mock, + specifying a failure error message. Use in conjuntion with the default + . + + This example assumes that the mock has been used, and later we want to verify that a given + invocation with specific parameters was performed: + + var mock = new Mock<IProcessor>(); + // exercise mock + //... + // Will throw if the test code didn't call Execute with a "ping" string argument. + mock.Verify(proc => proc.Execute("ping")); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails. + + + + Verifies that a specific invocation matching the given expression was performed on the mock, + specifying a failure error message. Use in conjuntion with the default + . + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called.Message to show if verification fails. + + + + Verifies that a specific invocation matching the given expression was performed on the mock. Use + in conjuntion with the default . + + This example assumes that the mock has been used, and later we want to verify that a given + invocation with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't call HasInventory. + mock.Verify(warehouse => warehouse.HasInventory(TALISKER, 50)); + + The invocation was not performed on the mock.Expression to verify.Type of return value from the expression. + + + + Verifies that a specific invocation matching the given + expression was performed on the mock. Use in conjuntion + with the default . + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called.Type of return value from the expression. + + + + Verifies that a specific invocation matching the given + expression was performed on the mock, specifying a failure + error message. + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't call HasInventory. + mock.Verify(warehouse => warehouse.HasInventory(TALISKER, 50), "When filling orders, inventory has to be checked"); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails.Type of return value from the expression. + + + + Verifies that a specific invocation matching the given + expression was performed on the mock, specifying a failure + error message. + + The invocation was not call the times specified by + . + Expression to verify.The number of times a method is allowed to be called.Message to show if verification fails.Type of return value from the expression. + + + + Verifies that a property was read on the mock. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was retrieved from it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't retrieve the IsClosed property. + mock.VerifyGet(warehouse => warehouse.IsClosed); + + The invocation was not performed on the mock.Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was read on the mock. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was read on the mock, specifying a failure + error message. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was retrieved from it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't retrieve the IsClosed property. + mock.VerifyGet(warehouse => warehouse.IsClosed); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was read on the mock, specifying a failure + error message. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify.Message to show if verification fails. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + + Verifies that a property was set on the mock. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was set on it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed = true); + + The invocation was not performed on the mock.Expression to verify. + + + + Verifies that a property was set on the mock. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify. + + + + Verifies that a property was set on the mock, specifying + a failure message. + + This example assumes that the mock has been used, + and later we want to verify that a given property + was set on it: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed = true, "Warehouse should always be closed after the action"); + + The invocation was not performed on the mock.Expression to verify.Message to show if verification fails. + + + + Verifies that a property was set on the mock, specifying + a failure message. + + The invocation was not call the times specified by + . + The number of times a method is allowed to be called.Expression to verify.Message to show if verification fails. + + + + Raises the event referenced in using + the given argument. + + The argument is + invalid for the target event invocation, or the is + not an event attach or detach expression. + + The following example shows how to raise a event: + + var mock = new Mock<IViewModel>(); + + mock.Raise(x => x.PropertyChanged -= null, new PropertyChangedEventArgs("Name")); + + + This example shows how to invoke an event with a custom event arguments + class in a view that will cause its corresponding presenter to + react by changing its state: + + var mockView = new Mock<IOrdersView>(); + var presenter = new OrdersPresenter(mockView.Object); + + // Check that the presenter has no selection by default + Assert.Null(presenter.SelectedOrder); + + // Raise the event with a specific arguments data + mockView.Raise(v => v.SelectionChanged += null, new OrderEventArgs { Order = new Order("moq", 500) }); + + // Now the presenter reacted to the event, and we have a selected order + Assert.NotNull(presenter.SelectedOrder); + Assert.Equal("moq", presenter.SelectedOrder.ProductName); + + + + + + Raises the event referenced in using + the given argument for a non-EventHandler typed event. + + The arguments are + invalid for the target event invocation, or the is + not an event attach or detach expression. + + The following example shows how to raise a custom event that does not adhere to + the standard EventHandler: + + var mock = new Mock<IViewModel>(); + + mock.Raise(x => x.MyEvent -= null, "Name", bool, 25); + + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + Exposes the mocked object instance. + + + + + Matcher to treat static functions as matchers. + + mock.Setup(x => x.StringMethod(A.MagicString())); + + public static class A + { + [Matcher] + public static string MagicString() { return null; } + public static bool MagicString(string arg) + { + return arg == "magic"; + } + } + + Will succeed if: mock.Object.StringMethod("magic"); + and fail with any other call. + + + + + Defines the Raises verb. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + The type of the fourteenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + The type of the fourteenth argument received by the expected invocation. + The type of the fifteenth argument received by the expected invocation. + + + + + Specifies the event that will be raised when the setup is matched. + + The expression that represents an event attach or detach action. + The function that will build the + to pass when raising the event. + The type of the first argument received by the expected invocation. + The type of the second argument received by the expected invocation. + The type of the third argument received by the expected invocation. + The type of the fourth argument received by the expected invocation. + The type of the fifth argument received by the expected invocation. + The type of the sixth argument received by the expected invocation. + The type of the seventh argument received by the expected invocation. + The type of the eighth argument received by the expected invocation. + The type of the nineth argument received by the expected invocation. + The type of the tenth argument received by the expected invocation. + The type of the eleventh argument received by the expected invocation. + The type of the twelfth argument received by the expected invocation. + The type of the thirteenth argument received by the expected invocation. + The type of the fourteenth argument received by the expected invocation. + The type of the fifteenth argument received by the expected invocation. + The type of the sixteenth argument received by the expected invocation. + + + + + Specifies the event that will be raised + when the setup is met. + + An expression that represents an event attach or detach action. + The event arguments to pass for the raised event. + + The following example shows how to raise an event when + the setup is met: + + var mock = new Mock<IContainer>(); + + mock.Setup(add => add.Add(It.IsAny<string>(), It.IsAny<object>())) + .Raises(add => add.Added += null, EventArgs.Empty); + + + + + + Specifies the event that will be raised + when the setup is matched. + + An expression that represents an event attach or detach action. + A function that will build the + to pass when raising the event. + + + + + Specifies the custom event that will be raised + when the setup is matched. + + An expression that represents an event attach or detach action. + The arguments to pass to the custom delegate (non EventHandler-compatible). + + + + Provides partial evaluation of subtrees, whenever they can be evaluated locally. + + Matt Warren: http://blogs.msdn.com/mattwar + Documented by InSTEDD: http://www.instedd.org + + + + Performs evaluation and replacement of independent sub-trees + + The root of the expression tree. + A function that decides whether a given expression + node can be part of the local function. + A new tree with sub-trees evaluated and replaced. + + + + Performs evaluation and replacement of independent sub-trees + + The root of the expression tree. + A new tree with sub-trees evaluated and replaced. + + + + Evaluates and replaces sub-trees when first candidate is reached (top-down) + + + + + Performs bottom-up analysis to determine which nodes can possibly + be part of an evaluated sub-tree. + + + + + Allows setups to be specified for protected members by using their + name as a string, rather than strong-typing them which is not possible + due to their visibility. + + + + + Specifies a setup for a void method invocation with the given + , optionally specifying arguments for the method call. + + The name of the void method to be invoked. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + + + + Specifies a setup for an invocation on a property or a non void method with the given + , optionally specifying arguments for the method call. + + The name of the method or property to be invoked. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + The return type of the method or property. + + + + Specifies a setup for an invocation on a property getter with the given + . + + The name of the property. + The type of the property. + + + + Specifies a setup for an invocation on a property setter with the given + . + + The name of the property. + The property value. If argument matchers are used, + remember to use rather than . + The type of the property. + + + + Specifies a verify for a void method with the given , + optionally specifying arguments for the method call. Use in conjuntion with the default + . + + The invocation was not call the times specified by + . + The name of the void method to be verified. + The number of times a method is allowed to be called. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + + + + Specifies a verify for an invocation on a property or a non void method with the given + , optionally specifying arguments for the method call. + + The invocation was not call the times specified by + . + The name of the method or property to be invoked. + The optional arguments for the invocation. If argument matchers are used, + remember to use rather than . + The number of times a method is allowed to be called. + The type of return value from the expression. + + + + Specifies a verify for an invocation on a property getter with the given + . + The invocation was not call the times specified by + . + + The name of the property. + The number of times a method is allowed to be called. + The type of the property. + + + + Specifies a setup for an invocation on a property setter with the given + . + + The invocation was not call the times specified by + . + The name of the property. + The number of times a method is allowed to be called. + The property value. + The type of the property. If argument matchers are used, + remember to use rather than . + + + + Marks a method as a matcher, which allows complete replacement + of the built-in class with your own argument + matching rules. + + + This feature has been deprecated in favor of the new + and simpler . + + + The argument matching is used to determine whether a concrete + invocation in the mock matches a given setup. This + matching mechanism is fully extensible. + + + There are two parts of a matcher: the compiler matcher + and the runtime matcher. + + + Compiler matcher + Used to satisfy the compiler requirements for the + argument. Needs to be a method optionally receiving any arguments + you might need for the matching, but with a return type that + matches that of the argument. + + Let's say I want to match a lists of orders that contains + a particular one. I might create a compiler matcher like the following: + + + public static class Orders + { + [Matcher] + public static IEnumerable<Order> Contains(Order order) + { + return null; + } + } + + Now we can invoke this static method instead of an argument in an + invocation: + + var order = new Order { ... }; + var mock = new Mock<IRepository<Order>>(); + + mock.Setup(x => x.Save(Orders.Contains(order))) + .Throws<ArgumentException>(); + + Note that the return value from the compiler matcher is irrelevant. + This method will never be called, and is just used to satisfy the + compiler and to signal Moq that this is not a method that we want + to be invoked at runtime. + + + + Runtime matcher + + The runtime matcher is the one that will actually perform evaluation + when the test is run, and is defined by convention to have the + same signature as the compiler matcher, but where the return + value is the first argument to the call, which contains the + object received by the actual invocation at runtime: + + public static bool Contains(IEnumerable<Order> orders, Order order) + { + return orders.Contains(order); + } + + At runtime, the mocked method will be invoked with a specific + list of orders. This value will be passed to this runtime + matcher as the first argument, while the second argument is the + one specified in the setup (x.Save(Orders.Contains(order))). + + The boolean returned determines whether the given argument has been + matched. If all arguments to the expected method are matched, then + the setup matches and is evaluated. + + + + + + Using this extensible infrastructure, you can easily replace the entire + set of matchers with your own. You can also avoid the + typical (and annoying) lengthy expressions that result when you have + multiple arguments that use generics. + + + The following is the complete example explained above: + + public static class Orders + { + [Matcher] + public static IEnumerable<Order> Contains(Order order) + { + return null; + } + + public static bool Contains(IEnumerable<Order> orders, Order order) + { + return orders.Contains(order); + } + } + + And the concrete test using this matcher: + + var order = new Order { ... }; + var mock = new Mock<IRepository<Order>>(); + + mock.Setup(x => x.Save(Orders.Contains(order))) + .Throws<ArgumentException>(); + + // use mock, invoke Save, and have the matcher filter. + + + + + + Defines the Callback verb for property getter setups. + + + Mocked type. + Type of the property. + + + + Specifies a callback to invoke when the property is retrieved. + + Callback method to invoke. + + Invokes the given callback with the property value being set. + + mock.SetupGet(x => x.Suspended) + .Callback(() => called = true) + .Returns(true); + + + + + + Allows the specification of a matching condition for an + argument in a method invocation, rather than a specific + argument value. "It" refers to the argument being matched. + + This class allows the setup to match a method invocation + with an arbitrary value, with a value in a specified range, or + even one that matches a given predicate. + + + + + Matches any value of the given type. + + Typically used when the actual argument value for a method + call is not relevant. + + + // Throws an exception for a call to Remove with any string value. + mock.Setup(x => x.Remove(It.IsAny<string>())).Throws(new InvalidOperationException()); + + Type of the value. + + + + Matches any value that satisfies the given predicate. + Type of the argument to check.The predicate used to match the method argument. + Allows the specification of a predicate to perform matching + of method call arguments. + + This example shows how to return the value 1 whenever the argument to the + Do method is an even number. + + mock.Setup(x => x.Do(It.Is<int>(i => i % 2 == 0))) + .Returns(1); + + This example shows how to throw an exception if the argument to the + method is a negative number: + + mock.Setup(x => x.GetUser(It.Is<int>(i => i < 0))) + .Throws(new ArgumentException()); + + + + + + Matches any value that is in the range specified. + Type of the argument to check.The lower bound of the range.The upper bound of the range. + The kind of range. See . + + The following example shows how to expect a method call + with an integer argument within the 0..100 range. + + mock.Setup(x => x.HasInventory( + It.IsAny<string>(), + It.IsInRange(0, 100, Range.Inclusive))) + .Returns(false); + + + + + + Matches a string argument if it matches the given regular expression pattern. + The pattern to use to match the string argument value. + The following example shows how to expect a call to a method where the + string argument matches the given regular expression: + + mock.Setup(x => x.Check(It.IsRegex("[a-z]+"))).Returns(1); + + + + + + Matches a string argument if it matches the given regular expression pattern. + The pattern to use to match the string argument value.The options used to interpret the pattern. + The following example shows how to expect a call to a method where the + string argument matches the given regular expression, in a case insensitive way: + + mock.Setup(x => x.Check(It.IsRegex("[a-z]+", RegexOptions.IgnoreCase))).Returns(1); + + + + + + We need this non-generics base class so that + we can use from + generic code. + + + + + Implements the fluent API. + + + + + Defines the Throws verb. + + + + + Specifies the exception to throw when the method is invoked. + + Exception instance to throw. + + This example shows how to throw an exception when the method is + invoked with an empty string argument: + + mock.Setup(x => x.Execute("")) + .Throws(new ArgumentException()); + + + + + + Specifies the type of exception to throw when the method is invoked. + + Type of exception to instantiate and throw when the setup is matched. + + This example shows how to throw an exception when the method is + invoked with an empty string argument: + + mock.Setup(x => x.Execute("")) + .Throws<ArgumentException>(); + + + + + + Implements the fluent API. + + + + + Defines occurrence members to constraint setups. + + + + + The expected invocation can happen at most once. + + + + var mock = new Mock<ICommand>(); + mock.Setup(foo => foo.Execute("ping")) + .AtMostOnce(); + + + + + + The expected invocation can happen at most specified number of times. + + The number of times to accept calls. + + + var mock = new Mock<ICommand>(); + mock.Setup(foo => foo.Execute("ping")) + .AtMost( 5 ); + + + + + + Defines the Verifiable verb. + + + + + Marks the expectation as verifiable, meaning that a call + to will check if this particular + expectation was met. + + + The following example marks the expectation as verifiable: + + mock.Expect(x => x.Execute("ping")) + .Returns(true) + .Verifiable(); + + + + + + Marks the expectation as verifiable, meaning that a call + to will check if this particular + expectation was met, and specifies a message for failures. + + + The following example marks the expectation as verifiable: + + mock.Expect(x => x.Execute("ping")) + .Returns(true) + .Verifiable("Ping should be executed always!"); + + + + + + Implements the fluent API. + + + + + Defines the Callback verb and overloads for callbacks on + setups that return a value. + + Mocked type. + Type of the return value of the setup. + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2) => Console.WriteLine(arg1 + arg2)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3) => Console.WriteLine(arg1 + arg2 + arg3)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4) => Console.WriteLine(arg1 + arg2 + arg3 + arg4)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15)); + + + + + + Specifies a callback to invoke when the method is called that receives the original + arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The type of the sixteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16)); + + + + + + Specifies a callback to invoke when the method is called. + + The callback method to invoke. + + The following example specifies a callback to set a boolean value that can be used later: + + var called = false; + mock.Setup(x => x.Execute()) + .Callback(() => called = true) + .Returns(true); + + Note that in the case of value-returning methods, after the Callback + call you can still specify the return value. + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the argument of the invoked method. + Callback method to invoke. + + Invokes the given callback with the concrete invocation argument value. + + Notice how the specific string argument is retrieved by simply declaring + it as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute(It.IsAny<string>())) + .Callback(command => Console.WriteLine(command)) + .Returns(true); + + + + + + Implements the fluent API. + + + + + Defines the Returns verb. + + Mocked type. + Type of the return value from the expression. + + + + Specifies the value to return. + + The value to return, or . + + Return a true value from the method call: + + mock.Setup(x => x.Execute("ping")) + .Returns(true); + + + + + + Specifies a function that will calculate the value to return from the method. + + The function that will calculate the return value. + + Return a calculated value when the method is called: + + mock.Setup(x => x.Execute("ping")) + .Returns(() => returnValues[0]); + + The lambda expression to retrieve the return value is lazy-executed, + meaning that its value may change depending on the moment the method + is executed and the value the returnValues array has at + that moment. + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the argument of the invoked method. + The function that will calculate the return value. + + Return a calculated value which is evaluated lazily at the time of the invocation. + + The lookup list can change between invocations and the setup + will return different values accordingly. Also, notice how the specific + string argument is retrieved by simply declaring it as part of the lambda + expression: + + + mock.Setup(x => x.Execute(It.IsAny<string>())) + .Returns((string command) => returnValues[command]); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2) => arg1 + arg2); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3) => arg1 + arg2 + arg3); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4) => arg1 + arg2 + arg3 + arg4); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5) => arg1 + arg2 + arg3 + arg4 + arg5); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15); + + + + + + Specifies a function that will calculate the value to return from the method, + retrieving the arguments for the invocation. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The type of the sixteenth argument of the invoked method. + The function that will calculate the return value. + Returns a calculated value which is evaluated lazily at the time of the invocation. + + + The return value is calculated from the value of the actual method invocation arguments. + Notice how the arguments are retrieved by simply declaring them as part of the lambda + expression: + + + mock.Setup(x => x.Execute( + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>(), + It.IsAny<int>())) + .Returns((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15, string arg16) => arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16); + + + + + + Implements the fluent API. + + + + + Implements the fluent API. + + + + + Defines the Returns verb for property get setups. + + Mocked type. + Type of the property. + + + + Specifies the value to return. + + The value to return, or . + + Return a true value from the property getter call: + + mock.SetupGet(x => x.Suspended) + .Returns(true); + + + + + + Specifies a function that will calculate the value to return for the property. + + The function that will calculate the return value. + + Return a calculated value when the property is retrieved: + + mock.SetupGet(x => x.Suspended) + .Returns(() => returnValues[0]); + + The lambda expression to retrieve the return value is lazy-executed, + meaning that its value may change depending on the moment the property + is retrieved and the value the returnValues array has at + that moment. + + + + + Implements the fluent API. + + + + + Defines the Callback verb and overloads. + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2) => Console.WriteLine(arg1 + arg2)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3) => Console.WriteLine(arg1 + arg2 + arg3)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4) => Console.WriteLine(arg1 + arg2 + arg3 + arg4)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15)); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The type of the first argument of the invoked method. + The type of the second argument of the invoked method. + The type of the third argument of the invoked method. + The type of the fourth argument of the invoked method. + The type of the fifth argument of the invoked method. + The type of the sixth argument of the invoked method. + The type of the seventh argument of the invoked method. + The type of the eighth argument of the invoked method. + The type of the nineth argument of the invoked method. + The type of the tenth argument of the invoked method. + The type of the eleventh argument of the invoked method. + The type of the twelfth argument of the invoked method. + The type of the thirteenth argument of the invoked method. + The type of the fourteenth argument of the invoked method. + The type of the fifteenth argument of the invoked method. + The type of the sixteenth argument of the invoked method. + The callback method to invoke. + A reference to interface. + + Invokes the given callback with the concrete invocation arguments values. + + Notice how the specific arguments are retrieved by simply declaring + them as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute( + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>(), + It.IsAny<string>())) + .Callback((string arg1, string arg2, string arg3, string arg4, string arg5, string arg6, string arg7, string arg8, string arg9, string arg10, string arg11, string arg12, string arg13, string arg14, string arg15, string arg16) => Console.WriteLine(arg1 + arg2 + arg3 + arg4 + arg5 + arg6 + arg7 + arg8 + arg9 + arg10 + arg11 + arg12 + arg13 + arg14 + arg15 + arg16)); + + + + + + Specifies a callback to invoke when the method is called. + + The callback method to invoke. + + The following example specifies a callback to set a boolean + value that can be used later: + + var called = false; + mock.Setup(x => x.Execute()) + .Callback(() => called = true); + + + + + + Specifies a callback to invoke when the method is called that receives the original arguments. + + The argument type of the invoked method. + The callback method to invoke. + + Invokes the given callback with the concrete invocation argument value. + + Notice how the specific string argument is retrieved by simply declaring + it as part of the lambda expression for the callback: + + + mock.Setup(x => x.Execute(It.IsAny<string>())) + .Callback((string command) => Console.WriteLine(command)); + + + + + + Implements the fluent API. + + + + + The expectation will be considered only in the former condition. + + + + + + + The expectation will be considered only in the former condition. + + + + + + + + Setups the get. + + The type of the property. + The expression. + + + + + Setups the set. + + The type of the property. + The setter expression. + + + + + Setups the set. + + The setter expression. + + + + + Utility repository class to use to construct multiple + mocks when consistent verification is + desired for all of them. + + + If multiple mocks will be created during a test, passing + the desired (if different than the + or the one + passed to the repository constructor) and later verifying each + mock can become repetitive and tedious. + + This repository class helps in that scenario by providing a + simplified creation of multiple mocks with a default + (unless overriden by calling + ) and posterior verification. + + + + The following is a straightforward example on how to + create and automatically verify strict mocks using a : + + var repository = new MockRepository(MockBehavior.Strict); + + var foo = repository.Create<IFoo>(); + var bar = repository.Create<IBar>(); + + // no need to call Verifiable() on the setup + // as we'll be validating all of them anyway. + foo.Setup(f => f.Do()); + bar.Setup(b => b.Redo()); + + // exercise the mocks here + + repository.VerifyAll(); + // At this point all setups are already checked + // and an optional MockException might be thrown. + // Note also that because the mocks are strict, any invocation + // that doesn't have a matching setup will also throw a MockException. + + The following examples shows how to setup the repository + to create loose mocks and later verify only verifiable setups: + + var repository = new MockRepository(MockBehavior.Loose); + + var foo = repository.Create<IFoo>(); + var bar = repository.Create<IBar>(); + + // this setup will be verified when we verify the repository + foo.Setup(f => f.Do()).Verifiable(); + + // this setup will NOT be verified + foo.Setup(f => f.Calculate()); + + // this setup will be verified when we verify the repository + bar.Setup(b => b.Redo()).Verifiable(); + + // exercise the mocks here + // note that because the mocks are Loose, members + // called in the interfaces for which no matching + // setups exist will NOT throw exceptions, + // and will rather return default values. + + repository.Verify(); + // At this point verifiable setups are already checked + // and an optional MockException might be thrown. + + The following examples shows how to setup the repository with a + default strict behavior, overriding that default for a + specific mock: + + var repository = new MockRepository(MockBehavior.Strict); + + // this particular one we want loose + var foo = repository.Create<IFoo>(MockBehavior.Loose); + var bar = repository.Create<IBar>(); + + // specify setups + + // exercise the mocks here + + repository.Verify(); + + + + + + + Utility factory class to use to construct multiple + mocks when consistent verification is + desired for all of them. + + + If multiple mocks will be created during a test, passing + the desired (if different than the + or the one + passed to the factory constructor) and later verifying each + mock can become repetitive and tedious. + + This factory class helps in that scenario by providing a + simplified creation of multiple mocks with a default + (unless overriden by calling + ) and posterior verification. + + + + The following is a straightforward example on how to + create and automatically verify strict mocks using a : + + var factory = new MockFactory(MockBehavior.Strict); + + var foo = factory.Create<IFoo>(); + var bar = factory.Create<IBar>(); + + // no need to call Verifiable() on the setup + // as we'll be validating all of them anyway. + foo.Setup(f => f.Do()); + bar.Setup(b => b.Redo()); + + // exercise the mocks here + + factory.VerifyAll(); + // At this point all setups are already checked + // and an optional MockException might be thrown. + // Note also that because the mocks are strict, any invocation + // that doesn't have a matching setup will also throw a MockException. + + The following examples shows how to setup the factory + to create loose mocks and later verify only verifiable setups: + + var factory = new MockFactory(MockBehavior.Loose); + + var foo = factory.Create<IFoo>(); + var bar = factory.Create<IBar>(); + + // this setup will be verified when we verify the factory + foo.Setup(f => f.Do()).Verifiable(); + + // this setup will NOT be verified + foo.Setup(f => f.Calculate()); + + // this setup will be verified when we verify the factory + bar.Setup(b => b.Redo()).Verifiable(); + + // exercise the mocks here + // note that because the mocks are Loose, members + // called in the interfaces for which no matching + // setups exist will NOT throw exceptions, + // and will rather return default values. + + factory.Verify(); + // At this point verifiable setups are already checked + // and an optional MockException might be thrown. + + The following examples shows how to setup the factory with a + default strict behavior, overriding that default for a + specific mock: + + var factory = new MockFactory(MockBehavior.Strict); + + // this particular one we want loose + var foo = factory.Create<IFoo>(MockBehavior.Loose); + var bar = factory.Create<IBar>(); + + // specify setups + + // exercise the mocks here + + factory.Verify(); + + + + + + + Initializes the factory with the given + for newly created mocks from the factory. + + The behavior to use for mocks created + using the factory method if not overriden + by using the overload. + + + + Creates a new mock with the default + specified at factory construction time. + + Type to mock. + A new . + + + var factory = new MockFactory(MockBehavior.Strict); + + var foo = factory.Create<IFoo>(); + // use mock on tests + + factory.VerifyAll(); + + + + + + Creates a new mock with the default + specified at factory construction time and with the + the given constructor arguments for the class. + + + The mock will try to find the best match constructor given the + constructor arguments, and invoke that to initialize the instance. + This applies only to classes, not interfaces. + + Type to mock. + Constructor arguments for mocked classes. + A new . + + + var factory = new MockFactory(MockBehavior.Default); + + var mock = factory.Create<MyBase>("Foo", 25, true); + // use mock on tests + + factory.Verify(); + + + + + + Creates a new mock with the given . + + Type to mock. + Behavior to use for the mock, which overrides + the default behavior specified at factory construction time. + A new . + + The following example shows how to create a mock with a different + behavior to that specified as the default for the factory: + + var factory = new MockFactory(MockBehavior.Strict); + + var foo = factory.Create<IFoo>(MockBehavior.Loose); + + + + + + Creates a new mock with the given + and with the the given constructor arguments for the class. + + + The mock will try to find the best match constructor given the + constructor arguments, and invoke that to initialize the instance. + This applies only to classes, not interfaces. + + Type to mock. + Behavior to use for the mock, which overrides + the default behavior specified at factory construction time. + Constructor arguments for mocked classes. + A new . + + The following example shows how to create a mock with a different + behavior to that specified as the default for the factory, passing + constructor arguments: + + var factory = new MockFactory(MockBehavior.Default); + + var mock = factory.Create<MyBase>(MockBehavior.Strict, "Foo", 25, true); + + + + + + Implements creation of a new mock within the factory. + + Type to mock. + The behavior for the new mock. + Optional arguments for the construction of the mock. + + + + Verifies all verifiable expectations on all mocks created + by this factory. + + + One or more mocks had expectations that were not satisfied. + + + + Verifies all verifiable expectations on all mocks created + by this factory. + + + One or more mocks had expectations that were not satisfied. + + + + Invokes for each mock + in , and accumulates the resulting + that might be + thrown from the action. + + The action to execute against + each mock. + + + + Whether the base member virtual implementation will be called + for mocked classes if no setup is matched. Defaults to . + + + + + Specifies the behavior to use when returning default values for + unexpected invocations on loose mocks. + + + + + Gets the mocks that have been created by this factory and + that will get verified together. + + + + + Initializes the repository with the given + for newly created mocks from the repository. + + The behavior to use for mocks created + using the repository method if not overriden + by using the overload. + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The type of the mocked object to query. + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The predicate with the setup expressions. + The type of the mocked object to query. + + + + Creates an mock object of the indicated type. + + The type of the mocked object. + The mocked object created. + + + + Creates an mock object of the indicated type. + + The predicate with the setup expressions. + The type of the mocked object. + The mocked object created. + + + + Creates the mock query with the underlying queriable implementation. + + + + + Wraps the enumerator inside a queryable. + + + + + Method that is turned into the actual call from .Query{T}, to + transform the queryable query into a normal enumerable query. + This method is never used directly by consumers. + + + + + Implements the fluent API. + + + + + Enables the Protected() method on , + allowing setups to be set for protected members by using their + name as a string, rather than strong-typing them which is not possible + due to their visibility. + + + + + Enable protected setups for the mock. + + Mocked object type. Typically omitted as it can be inferred from the mock instance. + The mock to set the protected setups on. + + + + A that returns an empty default value + for non-mockeable types, and mocks for all other types (interfaces and + non-sealed classes) that can be mocked. + + + + + A that returns an empty default value + for invocations that do not have setups or return values, with loose mocks. + This is the default behavior for a mock. + + + + + Interface to be implemented by classes that determine the + default value of non-expected invocations. + + + + + Defines the default value to return in all the methods returning . + The type of the return value.The value to set as default. + + + + Provides a value for the given member and arguments. + + The member to provide a default value for. + + + + + Implements the actual interception and method invocation for + all mocks. + + + + + Get an eventInfo for a given event name. Search type ancestors depth first if necessary. + + Name of the event, with the set_ or get_ prefix already removed + + + + Given a type return all of its ancestors, both types and interfaces. + + The type to find immediate ancestors of + + + + Implemented by all generated mock object instances. + + + + + Implemented by all generated mock object instances. + + + + + Reference the Mock that contains this as the mock.Object value. + + + + + Reference the Mock that contains this as the mock.Object value. + + + + + Tracks the current mock and interception context. + + + + + Having an active fluent mock context means that the invocation + is being performed in "trial" mode, just to gather the + target method and arguments that need to be matched later + when the actual invocation is made. + + + + + The intention of is to create a more readable + string representation for the failure message. + + + + + Determines the way default values are generated + calculated for loose mocks. + + + + + Default behavior, which generates empty values for + value types (i.e. default(int)), empty array and + enumerables, and nulls for all other reference types. + + + + + Whenever the default value generated by + is null, replaces this value with a mock (if the type + can be mocked). + + + For sealed classes, a null value will be generated. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Mock type has already been initialized by accessing its Object property. Adding interfaces must be done before that.. + + + + + Looks up a localized string similar to Value cannot be an empty string.. + + + + + Looks up a localized string similar to Can only add interfaces to the mock.. + + + + + Looks up a localized string similar to Can't set return value for void method {0}.. + + + + + Looks up a localized string similar to Constructor arguments cannot be passed for interface mocks.. + + + + + Looks up a localized string similar to A matching constructor for the given arguments was not found on the mocked type.. + + + + + Looks up a localized string similar to Could not locate event for attach or detach method {0}.. + + + + + Looks up a localized string similar to Expression {0} involves a field access, which is not supported. Use properties instead.. + + + + + Looks up a localized string similar to Type to mock must be an interface or an abstract or non-sealed class. . + + + + + Looks up a localized string similar to Cannot retrieve a mock with the given object type {0} as it's not the main type of the mock or any of its additional interfaces. + Please cast the argument to one of the supported types: {1}. + Remember that there's no generics covariance in the CLR, so your object must be one of these types in order for the call to succeed.. + + + + + Looks up a localized string similar to The equals ("==" or "=" in VB) and the conditional 'and' ("&&" or "AndAlso" in VB) operators are the only ones supported in the query specification expression. Unsupported expression: {0}. + + + + + Looks up a localized string similar to LINQ method '{0}' not supported.. + + + + + Looks up a localized string similar to Expression contains a call to a method which is not virtual (overridable in VB) or abstract. Unsupported expression: {0}. + + + + + Looks up a localized string similar to Member {0}.{1} does not exist.. + + + + + Looks up a localized string similar to Method {0}.{1} is public. Use strong-typed Expect overload instead: + mock.Setup(x => x.{1}()); + . + + + + + Looks up a localized string similar to {0} invocation failed with mock behavior {1}. + {2}. + + + + + Looks up a localized string similar to Expected only {0} calls to {1}.. + + + + + Looks up a localized string similar to Expected only one call to {0}.. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at least {2} times, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at least once, but was never performed: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at most {3} times, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock at most once, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock between {2} and {3} times (Exclusive), but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock between {2} and {3} times (Inclusive), but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock exactly {2} times, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock should never have been performed, but was {4} times: {1}. + + + + + Looks up a localized string similar to {0} + Expected invocation on the mock once, but was {4} times: {1}. + + + + + Looks up a localized string similar to All invocations on the mock must have a corresponding setup.. + + + + + Looks up a localized string similar to Object instance was not created by Moq.. + + + + + Looks up a localized string similar to Out expression must evaluate to a constant value.. + + + + + Looks up a localized string similar to Property {0}.{1} does not have a getter.. + + + + + Looks up a localized string similar to Property {0}.{1} does not exist.. + + + + + Looks up a localized string similar to Property {0}.{1} is write-only.. + + + + + Looks up a localized string similar to Property {0}.{1} is read-only.. + + + + + Looks up a localized string similar to Property {0}.{1} does not have a setter.. + + + + + Looks up a localized string similar to Cannot raise a mocked event unless it has been associated (attached) to a concrete event in a mocked object.. + + + + + Looks up a localized string similar to Ref expression must evaluate to a constant value.. + + + + + Looks up a localized string similar to Invocation needs to return a value and therefore must have a corresponding setup that provides it.. + + + + + Looks up a localized string similar to A lambda expression is expected as the argument to It.Is<T>.. + + + + + Looks up a localized string similar to Invocation {0} should not have been made.. + + + + + Looks up a localized string similar to Expression is not a method invocation: {0}. + + + + + Looks up a localized string similar to Expression is not a property access: {0}. + + + + + Looks up a localized string similar to Expression is not a property setter invocation.. + + + + + Looks up a localized string similar to Expression references a method that does not belong to the mocked object: {0}. + + + + + Looks up a localized string similar to Invalid setup on a non-virtual (overridable in VB) member: {0}. + + + + + Looks up a localized string similar to Type {0} does not implement required interface {1}. + + + + + Looks up a localized string similar to Type {0} does not from required type {1}. + + + + + Looks up a localized string similar to To specify a setup for public property {0}.{1}, use the typed overloads, such as: + mock.Setup(x => x.{1}).Returns(value); + mock.SetupGet(x => x.{1}).Returns(value); //equivalent to previous one + mock.SetupSet(x => x.{1}).Callback(callbackDelegate); + . + + + + + Looks up a localized string similar to Unsupported expression: {0}. + + + + + Looks up a localized string similar to Only property accesses are supported in intermediate invocations on a setup. Unsupported expression {0}.. + + + + + Looks up a localized string similar to Expression contains intermediate property access {0}.{1} which is of type {2} and cannot be mocked. Unsupported expression {3}.. + + + + + Looks up a localized string similar to Setter expression cannot use argument matchers that receive parameters.. + + + + + Looks up a localized string similar to Member {0} is not supported for protected mocking.. + + + + + Looks up a localized string similar to Setter expression can only use static custom matchers.. + + + + + Looks up a localized string similar to The following setups were not matched: + {0}. + + + + + Looks up a localized string similar to Invalid verify on a non-virtual (overridable in VB) member: {0}. + + + + + Provides additional methods on mocks. + + + Provided as extension methods as they confuse the compiler + with the overloads taking Action. + + + + + Specifies a setup on the mocked type for a call to + to a property setter, regardless of its value. + + + If more than one setup is set for the same property setter, + the latest one wins and is the one that will be executed. + + Type of the property. Typically omitted as it can be inferred from the expression. + Type of the mock. + The target mock for the setup. + Lambda expression that specifies the property setter. + + + mock.SetupSet(x => x.Suspended); + + + + This method is not legacy, but must be on an extension method to avoid + confusing the compiler with the new Action syntax. + + + + + Verifies that a property has been set on the mock, regarless of its value. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + Expression to verify. + The mock instance. + Mocked type. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Verifies that a property has been set on the mock, specifying a failure + error message. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + Expression to verify. + Message to show if verification fails. + The mock instance. + Mocked type. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Verifies that a property has been set on the mock, regardless + of the value but only the specified number of times. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + The invocation was not call the times specified by + . + The mock instance. + Mocked type. + The number of times a method is allowed to be called. + Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Verifies that a property has been set on the mock, regardless + of the value but only the specified number of times, and specifying a failure + error message. + + + This example assumes that the mock has been used, + and later we want to verify that a given invocation + with specific parameters was performed: + + var mock = new Mock<IWarehouse>(); + // exercise mock + //... + // Will throw if the test code didn't set the IsClosed property. + mock.VerifySet(warehouse => warehouse.IsClosed); + + + The invocation was not performed on the mock. + The invocation was not call the times specified by + . + The mock instance. + Mocked type. + The number of times a method is allowed to be called. + Message to show if verification fails. + Expression to verify. + Type of the property to verify. Typically omitted as it can + be inferred from the expression's return type. + + + + Exception thrown by mocks when setups are not matched, + the mock is not properly setup, etc. + + + A distinct exception type is provided so that exceptions + thrown by the mock can be differentiated in tests that + expect other exceptions to be thrown (i.e. ArgumentException). + + Richer exception hierarchy/types are not provided as + tests typically should not catch or expect exceptions + from the mocks. These are typically the result of changes + in the tested class or its collaborators implementation, and + result in fixes in the mock setup so that they dissapear and + allow the test to pass. + + + + + + Made internal as it's of no use for + consumers, but it's important for + our own tests. + + + + + Used by the mock factory to accumulate verification + failures. + + + + + Language for ReturnSequence + + + + + Returns value + + + + + Throws an exception + + + + + Throws an exception + + + + + Kind of range to use in a filter specified through + . + + + + + The range includes the to and + from values. + + + + + The range does not include the to and + from values. + + + + + Provides legacy API members as extensions so that + existing code continues to compile, but new code + doesn't see then. + + + + + Obsolete. + + + + + Obsolete. + + + + + Obsolete. + + + + + The first method call or member access will be the + last segment of the expression (depth-first traversal), + which is the one we have to Setup rather than FluentMock. + And the last one is the one we have to Mock.Get rather + than FluentMock. + + + + + Casts the expression to a lambda expression, removing + a cast if there's any. + + + + + Casts the body of the lambda expression to a . + + If the body is not a method call. + + + + Converts the body of the lambda expression into the referenced by it. + + + + + Checks whether the body of the lambda expression is a property access. + + + + + Checks whether the expression is a property access. + + + + + Checks whether the body of the lambda expression is a property indexer, which is true + when the expression is an whose + has + equal to . + + + + + Checks whether the expression is a property indexer, which is true + when the expression is an whose + has + equal to . + + + + + Creates an expression that casts the given expression to the + type. + + + + + TODO: remove this code when https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=331583 + is fixed. + + + + + Defines the number of invocations allowed by a mocked method. + + + + + Specifies that a mocked method should be invoked times as minimum. + The minimun number of times.An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked one time as minimum. + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked time as maximun. + The maximun number of times.An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked one time as maximun. + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked between and + times. + The minimun number of times.The maximun number of times. + The kind of range. See . + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked exactly times. + The times that a method or property can be called.An object defining the allowed number of invocations. + + + + Specifies that a mocked method should not be invoked. + An object defining the allowed number of invocations. + + + + Specifies that a mocked method should be invoked exactly one time. + An object defining the allowed number of invocations. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Determines whether two specified objects have the same value. + + The first . + + The second . + + true if the value of left is the same as the value of right; otherwise, false. + + + + + Determines whether two specified objects have different values. + + The first . + + The second . + + true if the value of left is different from the value of right; otherwise, false. + + + + + Helper for sequencing return values in the same method. + + + + + Return a sequence of values, once per call. + + + + + A default implementation of IQueryable for use with QueryProvider + + + + + The is a + static method that returns an IQueryable of Mocks of T which is used to + apply the linq specification to. + + + + + Defines the Callback verb for property setter setups. + + Type of the property. + + + + Specifies a callback to invoke when the property is set that receives the + property value being set. + + Callback method to invoke. + + Invokes the given callback with the property value being set. + + mock.SetupSet(x => x.Suspended) + .Callback((bool state) => Console.WriteLine(state)); + + + + + + Implements the fluent API. + + + + + Allows the specification of a matching condition for an + argument in a protected member setup, rather than a specific + argument value. "ItExpr" refers to the argument being matched. + + + Use this variant of argument matching instead of + for protected setups. + This class allows the setup to match a method invocation + with an arbitrary value, with a value in a specified range, or + even one that matches a given predicate, or null. + + + + + Matches a null value of the given type. + + + Required for protected mocks as the null value cannot be used + directly as it prevents proper method overload selection. + + + + // Throws an exception for a call to Remove with a null string value. + mock.Protected() + .Setup("Remove", ItExpr.IsNull<string>()) + .Throws(new InvalidOperationException()); + + + Type of the value. + + + + Matches any value of the given type. + + + Typically used when the actual argument value for a method + call is not relevant. + + + + // Throws an exception for a call to Remove with any string value. + mock.Protected() + .Setup("Remove", ItExpr.IsAny<string>()) + .Throws(new InvalidOperationException()); + + + Type of the value. + + + + Matches any value that satisfies the given predicate. + + Type of the argument to check. + The predicate used to match the method argument. + + Allows the specification of a predicate to perform matching + of method call arguments. + + + This example shows how to return the value 1 whenever the argument to the + Do method is an even number. + + mock.Protected() + .Setup("Do", ItExpr.Is<int>(i => i % 2 == 0)) + .Returns(1); + + This example shows how to throw an exception if the argument to the + method is a negative number: + + mock.Protected() + .Setup("GetUser", ItExpr.Is<int>(i => i < 0)) + .Throws(new ArgumentException()); + + + + + + Matches any value that is in the range specified. + + Type of the argument to check. + The lower bound of the range. + The upper bound of the range. + The kind of range. See . + + The following example shows how to expect a method call + with an integer argument within the 0..100 range. + + mock.Protected() + .Setup("HasInventory", + ItExpr.IsAny<string>(), + ItExpr.IsInRange(0, 100, Range.Inclusive)) + .Returns(false); + + + + + + Matches a string argument if it matches the given regular expression pattern. + + The pattern to use to match the string argument value. + + The following example shows how to expect a call to a method where the + string argument matches the given regular expression: + + mock.Protected() + .Setup("Check", ItExpr.IsRegex("[a-z]+")) + .Returns(1); + + + + + + Matches a string argument if it matches the given regular expression pattern. + + The pattern to use to match the string argument value. + The options used to interpret the pattern. + + The following example shows how to expect a call to a method where the + string argument matches the given regular expression, in a case insensitive way: + + mock.Protected() + .Setup("Check", ItExpr.IsRegex("[a-z]+", RegexOptions.IgnoreCase)) + .Returns(1); + + + + + + Helper class to setup a full trace between many mocks + + + + + Initialize a trace setup + + + + + Allow sequence to be repeated + + + + + define nice api + + + + + Perform an expectation in the trace. + + + + + Ensures the given is not null. + Throws otherwise. + + + + + Ensures the given string is not null or empty. + Throws in the first case, or + in the latter. + + + + + Checks an argument to ensure it is in the specified range including the edges. + + Type of the argument to check, it must be an type. + + The expression containing the name of the argument. + The argument value to check. + The minimun allowed value for the argument. + The maximun allowed value for the argument. + + + + Checks an argument to ensure it is in the specified range excluding the edges. + + Type of the argument to check, it must be an type. + + The expression containing the name of the argument. + The argument value to check. + The minimun allowed value for the argument. + The maximun allowed value for the argument. + + + + Allows creation custom value matchers that can be used on setups and verification, + completely replacing the built-in class with your own argument + matching rules. + + See also . + + + + + Provided for the sole purpose of rendering the delegate passed to the + matcher constructor if no friendly render lambda is provided. + + + + + Initializes the match with the condition that + will be checked in order to match invocation + values. + The condition to match against actual values. + + + + + + + + + This method is used to set an expression as the last matcher invoked, + which is used in the SetupSet to allow matchers in the prop = value + delegate expression. This delegate is executed in "fluent" mode in + order to capture the value being set, and construct the corresponding + methodcall. + This is also used in the MatcherFactory for each argument expression. + This method ensures that when we execute the delegate, we + also track the matcher that was invoked, so that when we create the + methodcall we build the expression using it, rather than the null/default + value returned from the actual invocation. + + + + + Allows creation custom value matchers that can be used on setups and verification, + completely replacing the built-in class with your own argument + matching rules. + Type of the value to match. + The argument matching is used to determine whether a concrete + invocation in the mock matches a given setup. This + matching mechanism is fully extensible. + + Creating a custom matcher is straightforward. You just need to create a method + that returns a value from a call to with + your matching condition and optional friendly render expression: + + [Matcher] + public Order IsBigOrder() + { + return Match<Order>.Create( + o => o.GrandTotal >= 5000, + /* a friendly expression to render on failures */ + () => IsBigOrder()); + } + + This method can be used in any mock setup invocation: + + mock.Setup(m => m.Submit(IsBigOrder()).Throws<UnauthorizedAccessException>(); + + At runtime, Moq knows that the return value was a matcher (note that the method MUST be + annotated with the [Matcher] attribute in order to determine this) and + evaluates your predicate with the actual value passed into your predicate. + + Another example might be a case where you want to match a lists of orders + that contains a particular one. You might create matcher like the following: + + + public static class Orders + { + [Matcher] + public static IEnumerable<Order> Contains(Order order) + { + return Match<IEnumerable<Order>>.Create(orders => orders.Contains(order)); + } + } + + Now we can invoke this static method instead of an argument in an + invocation: + + var order = new Order { ... }; + var mock = new Mock<IRepository<Order>>(); + + mock.Setup(x => x.Save(Orders.Contains(order))) + .Throws<ArgumentException>(); + + + + + + Allows querying the universe of mocks for those that behave + according to the LINQ query specification. + + + This entry-point into Linq to Mocks is the only one in the root Moq + namespace to ease discovery. But to get all the mocking extension + methods on Object, a using of Moq.Linq must be done, so that the + polluting of the intellisense for all objects is an explicit opt-in. + + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The type of the mocked object to query. + + + + Access the universe of mocks of the given type, to retrieve those + that behave according to the LINQ query specification. + + The predicate with the setup expressions. + The type of the mocked object to query. + + + + Creates an mock object of the indicated type. + + The type of the mocked object. + The mocked object created. + + + + Creates an mock object of the indicated type. + + The predicate with the setup expressions. + The type of the mocked object. + The mocked object created. + + + + Creates the mock query with the underlying queriable implementation. + + + + + Wraps the enumerator inside a queryable. + + + + + Method that is turned into the actual call from .Query{T}, to + transform the queryable query into a normal enumerable query. + This method is never used directly by consumers. + + + + + Extension method used to support Linq-like setup properties that are not virtual but do have + a getter and a setter, thereby allowing the use of Linq to Mocks to quickly initialize Dtos too :) + + + + + Helper extensions that are used by the query translator. + + + + + Retrieves a fluent mock from the given setup expression. + + + + diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/Libs/Moq.dll Binary file SilverlightValidation/Libs/Moq.dll has changed diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/Libs/nunit.framework.dll Binary file SilverlightValidation/Libs/nunit.framework.dll has changed diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightTest1/App.xaml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightTest1/App.xaml Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,8 @@ + + + + + diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightTest1/App.xaml.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightTest1/App.xaml.cs Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,58 @@ +using System; +using System.Windows; +using Microsoft.Silverlight.Testing; + +namespace SilverlightTest1 +{ + public partial class App : Application + { + + public App() + { + this.Startup += this.Application_Startup; + this.Exit += this.Application_Exit; + this.UnhandledException += this.Application_UnhandledException; + + InitializeComponent(); + } + + private void Application_Startup(object sender, StartupEventArgs e) + { + RootVisual = UnitTestSystem.CreateTestPage(); + } + + private void Application_Exit(object sender, EventArgs e) + { + + } + private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) + { + // If the app is running outside of the debugger then report the exception using + // the browser's exception mechanism. On IE this will display it a yellow alert + // icon in the status bar and Firefox will display a script error. + if (!System.Diagnostics.Debugger.IsAttached) + { + + // NOTE: This will allow the application to continue running after an exception has been thrown + // but not handled. + // For production applications this error handling should be replaced with something that will + // report the error to the website and stop the application. + e.Handled = true; + Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); }); + } + } + private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e) + { + try + { + string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace; + errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n"); + + System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");"); + } + catch (Exception) + { + } + } + } +} \ No newline at end of file diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightTest1/Properties/AppManifest.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightTest1/Properties/AppManifest.xml Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,7 @@ + + + + + diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightTest1/Properties/AssemblyInfo.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightTest1/Properties/AssemblyInfo.cs Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,37 @@ +// Copyright © 2012 + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SilverlightTest1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SilverlightTest1")] +[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("742825e3-6631-4dc4-95b8-9506052f7ed9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightTest1/SilverlightTest1.csproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightTest1/SilverlightTest1.csproj Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,116 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {AA0B1C80-97AE-49F5-8310-5A7683BE47BF} + {A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + SilverlightTest1 + SilverlightTest1 + Silverlight + v5.0 + $(TargetFrameworkVersion) + true + + true + true + SilverlightTest1.xap + Properties\AppManifest.xml + SilverlightTest1.App + TestPage.html + true + true + false + Properties\OutOfBrowserSettings.xml + false + true + + + + + + + v3.5 + + + true + full + false + Bin\Debug + DEBUG;TRACE;SILVERLIGHT + true + true + prompt + 4 + + + pdbonly + true + Bin\Release + TRACE;SILVERLIGHT + true + true + prompt + 4 + + + + $(MSBuildExtensionsPath)\..\Microsoft SDKs\Silverlight\v4.0\Toolkit\Apr10\Testing\Microsoft.Silverlight.Testing.dll + + + $(MSBuildExtensionsPath)\..\Microsoft SDKs\Silverlight\v4.0\Toolkit\Apr10\Testing\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll + + + + + + + + + + + + App.xaml + + + + + + + Designer + MSBuild:Compile + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightTest1/Tests.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightTest1/Tests.cs Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,24 @@ +using System; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Shapes; +using Microsoft.Silverlight.Testing; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace SilverlightTest1 +{ + [TestClass] + public class Tests + { + [TestMethod] + public void TestMethod1() + { + } + } +} \ No newline at end of file diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests.NUnit/Fakes/UserModelValidatorFake.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightValidation.Tests.NUnit/Fakes/UserModelValidatorFake.cs Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,38 @@ +using System; +using FluentValidation; +using SilverlightValidation.Interfaces; + +namespace SilverlightValidation.Tests.Fakes +{ + class UserModelValidatorFake : AbstractValidator + { + private UserModelValidatorFake() + { + RuleFor(x => x.Username) + .Length(3, 8) + .WithMessage("Must be between 3-8 characters."); + + RuleFor(x => x.Password) + .Matches(@"^\w*(?=\w*\d)(?=\w*[a-z])(?=\w*[A-Z])\w*$") + .WithMessage("Must contain lower, upper and numeric chars."); + + RuleFor(x => x.Email) + .EmailAddress() + .WithMessage("A valid email address is required."); + + RuleFor(x => x.DateOfBirth) + .Must(BeAValidDateOfBirth) + .WithMessage("Must be within 100 years of today."); + } + + private bool BeAValidDateOfBirth(DateTime? dateOfBirth) + { + if (dateOfBirth == null) return false; + if (dateOfBirth.Value > DateTime.Today || dateOfBirth < DateTime.Today.AddYears(-100)) + return false; + return true; + } + + public static UserModelValidatorFake Create() { return new UserModelValidatorFake(); } + } +} diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests.NUnit/Properties/AssemblyInfo.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightValidation.Tests.NUnit/Properties/AssemblyInfo.cs Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SilverlightValidation.Tests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SilverlightValidation.Tests")] +[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("843ea0ec-635f-4592-b3e6-5893be73bc5e")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests.NUnit/SilverlightValidation.Tests.csproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightValidation.Tests.NUnit/SilverlightValidation.Tests.csproj Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,81 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {02CCF8C7-1311-453F-BF82-3564AD9E7B8C} + Library + Properties + SilverlightValidation.Tests + SilverlightValidation.Tests + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\Libs\FakeItEasy.dll + + + ..\Libs\FluentAssertions.dll + + + ..\Libs\FluentValidation.dll + + + ..\Libs\nunit.framework.dll + + + + + ..\Libs\System.Windows.dll + + + + + + + + + + + + + + + + + {13B5F568-F402-4A2A-9A23-0FDF0B5564E3} + SilverlightValidation.PL + + + + + + + + \ No newline at end of file diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests.NUnit/ViewModels/UserListViewModelFixture.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightValidation.Tests.NUnit/ViewModels/UserListViewModelFixture.cs Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,15 @@ +using System; +using NUnit.Framework; + +namespace SilverlightValidation.Tests.ViewModels +{ + [TestFixture] + class UserListViewModelFixture + { + [Test] + public void Given_When_Then() + { + Assert.True(true); + } + } +} diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests.NUnit/ViewModels/UserViewModelFixture.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightValidation.Tests.NUnit/ViewModels/UserViewModelFixture.cs Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,222 @@ +using System; +using FluentAssertions.EventMonitoring; +using NUnit.Framework; +using SilverlightValidation.Models; +using SilverlightValidation.Tests.Fakes; +using SilverlightValidation.Validators; +using SilverlightValidation.ViewModels; + +namespace SilverlightValidation.Tests.ViewModels +{ + [TestFixture] + class UserViewModelFixture + { + #region Constructor + + [Test] + public void WhenConstructed_WithTwoNulls_ThenArgumentNullExceptionForModel() + { + Assert.Throws(() => new UserViewModel(null, null), "model"); + } + + [Test] + public void WhenConstructed_WithNullFirstParam_ThenArgumentNullExceptionForModel() + { + Assert.Throws(() => new UserViewModel(null, UserModelValidator.Create()), "model"); + } + + [Test] + public void WhenConstructed_WithNullSecondParam_ThenArgumentNullExceptionForValidator() + { + Assert.Throws(() => new UserViewModel(UserModel.Create(), null), "validator"); + } + + [Test] + public void WhenConstructed_WithGenericParams_ThenInstantiatesViewModel() + { + var vm = new UserViewModel(UserModel.Create(), UserModelValidator.Create()); + Assert.IsNotNull(vm); + } + + #endregion + + #region INotifyPropertyChanged + + [Test] + public void WhenPropertyChanged_WithValidDateOfBirthUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() + { + // arrange + var vm = CreateDefaultUserViewModel(); + + // act + vm.DateOfBirth = new DateTime(1977, 01, 01); + + // assert + vm.ShouldRaisePropertyChangeFor(x => x.DateOfBirth); + Assert.IsTrue(vm.IsChanged); + } + + + [Test] + public void WhenPropertyChanged_WithInvalidDateOfBirthUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() + { + // arrange + var vm = CreateDefaultUserViewModel(); + + // act + vm.DateOfBirth = new DateTime(1800, 01, 01); + + // assert + vm.ShouldRaisePropertyChangeFor(x => x.DateOfBirth); + Assert.IsTrue(vm.IsChanged); + } + + [Test] + public void WhenPropertyChanged_WithDescriptionUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() + { + // arrange + var vm = CreateDefaultUserViewModel(); + + // act + vm.Description = "New description"; + + // assert + vm.ShouldRaisePropertyChangeFor(x => x.Description); + Assert.IsTrue(vm.IsChanged); + } + + [Test] + public void WhenPropertyChanged_WithValidEmailUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() + { + // arrange + var vm = CreateDefaultUserViewModel(); + + // act + vm.Email = "test@domain.com"; + + // assert + vm.ShouldRaisePropertyChangeFor(x => x.Email); + Assert.IsTrue(vm.IsChanged); + } + + [Test] + public void WhenPropertyChanged_WithInvalidEmailUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() + { + // arrange + var vm = CreateDefaultUserViewModel(); + + // act + vm.Email = "invalid email"; + + // assert + vm.ShouldRaisePropertyChangeFor(x => x.Email); + Assert.IsTrue(vm.IsChanged); + } + + [Test] + public void WhenPropertyChanged_WithValidUsernameUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() + { + // arrange + var vm = CreateDefaultUserViewModel(); + + // act + vm.Username = "dummy"; + + // assert + vm.ShouldRaisePropertyChangeFor(x => x.Username); + Assert.IsTrue(vm.IsChanged); + } + + [Test] + public void WhenPropertyChanged_WithInvalidUsernameUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() + { + // arrange + var vm = CreateDefaultUserViewModel(); + + // act + vm.Username = "invalidusernametoolong"; + + // assert + vm.ShouldRaisePropertyChangeFor(x => x.Username); + Assert.IsTrue(vm.IsChanged); + } + + [Test] + public void WhenPropertyChanged_WithValidPasswordUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() + { + // arrange + var vm = CreateDefaultUserViewModel(); + + // act + vm.Password = "dummy"; + + // assert + vm.ShouldRaisePropertyChangeFor(x => x.Password); + Assert.IsTrue(vm.IsChanged); + } + + [Test] + public void WhenPropertyChanged_WithInvalidPasswordUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() + { + // arrange + var vm = CreateDefaultUserViewModel(); + + // act + vm.Password = "invalidpasswordtoolong"; + + // assert + vm.ShouldRaisePropertyChangeFor(x => x.Password); + Assert.IsTrue(vm.IsChanged); + } + + #endregion + + #region Commands + + [Test] + public void WhenNewViewModel_ThenOkCommandIsExecutable() + { + // arrange + var vm = CreateDefaultUserViewModel(); + + // assert + Assert.IsTrue(vm.OkCommand.CanExecute(null)); + } + + [Test] + public void WhenNewViewModel_ThenCancelCommandIsExecutable() + { + // arrange + var vm = CreateDefaultUserViewModel(); + + // assert + Assert.IsTrue(vm.CancelCommand.CanExecute(null)); + } + + [Test] + public void WhenNewViewModel_WithCancelExecuted_ThenShouldRaiseEvent() + { + // arrange + var vm = CreateDefaultUserViewModel(); + + // act + vm.CancelCommand.Execute(null); + + // assert + vm.ShouldRaise("UserViewResponseMessage"); + } + + #endregion + + #region Helpers + + private static UserViewModel CreateDefaultUserViewModel() + { + var vm = new UserViewModel(UserModel.Create(), UserModelValidatorFake.Create()); + vm.MonitorEvents(); + return vm; + } + + #endregion + } +} diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests.NUnit/ViewModels/ViewModelBaseFixture.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightValidation.Tests.NUnit/ViewModels/ViewModelBaseFixture.cs Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using NUnit.Framework; + +namespace SilverlightValidation.Tests.ViewModels +{ + [TestFixture] + class ViewModelBaseFixture + { + + } +} diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests.NUnit/packages.config --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightValidation.Tests.NUnit/packages.config Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests/App.xaml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightValidation.Tests/App.xaml Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,4 @@ + + diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests/App.xaml.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightValidation.Tests/App.xaml.cs Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,58 @@ +using System; +using System.Windows; +using Microsoft.Silverlight.Testing; + +namespace SilverlightValidation.Tests +{ + public partial class App + { + + public App() + { + this.Startup += this.Application_Startup; + this.Exit += this.Application_Exit; + this.UnhandledException += this.Application_UnhandledException; + + InitializeComponent(); + } + + private void Application_Startup(object sender, StartupEventArgs e) + { + RootVisual = UnitTestSystem.CreateTestPage(); + } + + private void Application_Exit(object sender, EventArgs e) + { + + } + private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) + { + // If the app is running outside of the debugger then report the exception using + // the browser's exception mechanism. On IE this will display it a yellow alert + // icon in the status bar and Firefox will display a script error. + if (!System.Diagnostics.Debugger.IsAttached) + { + + // NOTE: This will allow the application to continue running after an exception has been thrown + // but not handled. + // For production applications this error handling should be replaced with something that will + // report the error to the website and stop the application. + e.Handled = true; + Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); }); + } + } + private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e) + { + try + { + string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace; + errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n"); + + System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");"); + } + catch (Exception) + { + } + } + } +} \ No newline at end of file diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests/Properties/AppManifest.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/SilverlightValidation.Tests/Properties/AppManifest.xml Sun May 06 16:09:28 2012 +0100 @@ -0,0 +1,7 @@ + + + + + diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests/Properties/AssemblyInfo.cs --- a/SilverlightValidation/SilverlightValidation.Tests/Properties/AssemblyInfo.cs Sun May 06 13:00:46 2012 +0100 +++ b/SilverlightValidation/SilverlightValidation.Tests/Properties/AssemblyInfo.cs Sun May 06 16:09:28 2012 +0100 @@ -1,4 +1,6 @@ -using System.Reflection; +// Copyright © 2012 + +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -20,7 +22,7 @@ [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("843ea0ec-635f-4592-b3e6-5893be73bc5e")] +[assembly: Guid("373cbfeb-a5d8-4b7e-8dd0-d6d441242d46")] // Version information for an assembly consists of the following four values: // @@ -29,8 +31,7 @@ // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests/SilverlightValidation.Tests.csproj --- a/SilverlightValidation/SilverlightValidation.Tests/SilverlightValidation.Tests.csproj Sun May 06 13:00:46 2012 +0100 +++ b/SilverlightValidation/SilverlightValidation.Tests/SilverlightValidation.Tests.csproj Sun May 06 16:09:28 2012 +0100 @@ -3,79 +3,160 @@ Debug AnyCPU - 8.0.30703 + 9.0.30729 2.0 - {02CCF8C7-1311-453F-BF82-3564AD9E7B8C} + {D6F19856-008B-4FD6-B5B9-B941AD1AA7B5} + {A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} Library Properties SilverlightValidation.Tests SilverlightValidation.Tests - v4.0 - 512 + Silverlight + v5.0 + $(TargetFrameworkVersion) + true + + true + true + SilverlightValidation.Tests.xap + Properties\AppManifest.xml + SilverlightValidation.Tests.App + TestPage.html + true + true + false + Properties\OutOfBrowserSettings.xml + false + true + + + + + + + v3.5 true full false - bin\Debug\ - DEBUG;TRACE + Bin\Debug + DEBUG;TRACE;SILVERLIGHT + true + true prompt 4 pdbonly true - bin\Release\ - TRACE + Bin\Release + TRACE;SILVERLIGHT + true + true prompt 4 - - ..\Libs\FakeItEasy.dll - - - ..\Libs\FluentAssertions.dll + + ..\Libs\FluentAssertions.Silverlight.dll ..\Libs\FluentValidation.dll - - ..\Libs\nunit.framework.dll + + False + ..\Libs\GalaSoft.MvvmLight.Extras.SL5.dll + + + False + ..\Libs\GalaSoft.MvvmLight.SL5.dll + + + ..\Libs\Microsoft.Practices.ServiceLocation.dll - + + ..\Libs\Microsoft.Silverlight.Testing.dll + + + ..\Libs\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll + + + ..\Libs\Moq.Silverlight.dll + + + + - - ..\Libs\System.Windows.dll + + + ..\Libs\System.Windows.Controls.dll + + + ..\Libs\System.Windows.Controls.Data.dll + + + ..\Libs\System.Windows.Controls.Data.Input.dll - - - - + + ..\Libs\System.Windows.Controls.Navigation.dll + + + ..\Libs\System.Windows.Interactivity.dll + + + + + + App.xaml + + - + + + {13B5F568-F402-4A2A-9A23-0FDF0B5564E3} SilverlightValidation.PL - + + MSBuild:Compile + Designer + - - + + + + + + + + + + \ No newline at end of file diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests/ViewModels/UserListViewModelFixture.cs --- a/SilverlightValidation/SilverlightValidation.Tests/ViewModels/UserListViewModelFixture.cs Sun May 06 13:00:46 2012 +0100 +++ b/SilverlightValidation/SilverlightValidation.Tests/ViewModels/UserListViewModelFixture.cs Sun May 06 16:09:28 2012 +0100 @@ -1,15 +1,6 @@ using System; -using NUnit.Framework; namespace SilverlightValidation.Tests.ViewModels { - [TestFixture] - class UserListViewModelFixture - { - [Test] - public void Given_When_Then() - { - Assert.True(true); - } - } + } diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests/ViewModels/UserViewModelFixture.cs --- a/SilverlightValidation/SilverlightValidation.Tests/ViewModels/UserViewModelFixture.cs Sun May 06 13:00:46 2012 +0100 +++ b/SilverlightValidation/SilverlightValidation.Tests/ViewModels/UserViewModelFixture.cs Sun May 06 16:09:28 2012 +0100 @@ -1,6 +1,8 @@ using System; using FluentAssertions.EventMonitoring; -using NUnit.Framework; +using GalaSoft.MvvmLight.Messaging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using SilverlightValidation.Messages; using SilverlightValidation.Models; using SilverlightValidation.Tests.Fakes; using SilverlightValidation.Validators; @@ -8,30 +10,33 @@ namespace SilverlightValidation.Tests.ViewModels { - [TestFixture] - class UserViewModelFixture + [TestClass] + public class UserViewModelFixture { #region Constructor - [Test] - public void WhenConstructed_WithTwoNulls_ThenArgumentNullExceptionForModel() + [TestMethod] + [ExpectedException(typeof(ArgumentNullException))] + public void WhenConstructed_WithTwoNulls_ThenThrowsArgumentNullException() { - Assert.Throws(() => new UserViewModel(null, null), "model"); + new UserViewModel(null, null); } - [Test] - public void WhenConstructed_WithNullFirstParam_ThenArgumentNullExceptionForModel() + [TestMethod] + [ExpectedException(typeof(ArgumentNullException))] + public void WhenConstructed_WithNullFirstParam_ThenThrowsArgumentNullException() { - Assert.Throws(() => new UserViewModel(null, UserModelValidator.Create()), "model"); + new UserViewModel(null, UserModelValidator.Create()); } - [Test] - public void WhenConstructed_WithNullSecondParam_ThenArgumentNullExceptionForValidator() + [TestMethod] + [ExpectedException(typeof(ArgumentNullException))] + public void WhenConstructed_WithNullSecondParam_ThenThrowsArgumentNullException() { - Assert.Throws(() => new UserViewModel(UserModel.Create(), null), "validator"); + new UserViewModel(UserModel.Create(), null); } - [Test] + [TestMethod] public void WhenConstructed_WithGenericParams_ThenInstantiatesViewModel() { var vm = new UserViewModel(UserModel.Create(), UserModelValidator.Create()); @@ -42,7 +47,7 @@ #region INotifyPropertyChanged - [Test] + [TestMethod] public void WhenPropertyChanged_WithValidDateOfBirthUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() { // arrange @@ -57,7 +62,7 @@ } - [Test] + [TestMethod] public void WhenPropertyChanged_WithInvalidDateOfBirthUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() { // arrange @@ -71,7 +76,7 @@ Assert.IsTrue(vm.IsChanged); } - [Test] + [TestMethod] public void WhenPropertyChanged_WithDescriptionUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() { // arrange @@ -85,7 +90,7 @@ Assert.IsTrue(vm.IsChanged); } - [Test] + [TestMethod] public void WhenPropertyChanged_WithValidEmailUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() { // arrange @@ -99,7 +104,7 @@ Assert.IsTrue(vm.IsChanged); } - [Test] + [TestMethod] public void WhenPropertyChanged_WithInvalidEmailUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() { // arrange @@ -113,7 +118,7 @@ Assert.IsTrue(vm.IsChanged); } - [Test] + [TestMethod] public void WhenPropertyChanged_WithValidUsernameUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() { // arrange @@ -127,7 +132,7 @@ Assert.IsTrue(vm.IsChanged); } - [Test] + [TestMethod] public void WhenPropertyChanged_WithInvalidUsernameUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() { // arrange @@ -141,7 +146,7 @@ Assert.IsTrue(vm.IsChanged); } - [Test] + [TestMethod] public void WhenPropertyChanged_WithValidPasswordUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() { // arrange @@ -155,7 +160,7 @@ Assert.IsTrue(vm.IsChanged); } - [Test] + [TestMethod] public void WhenPropertyChanged_WithInvalidPasswordUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() { // arrange @@ -173,7 +178,7 @@ #region Commands - [Test] + [TestMethod] public void WhenNewViewModel_ThenOkCommandIsExecutable() { // arrange @@ -183,7 +188,7 @@ Assert.IsTrue(vm.OkCommand.CanExecute(null)); } - [Test] + [TestMethod] public void WhenNewViewModel_ThenCancelCommandIsExecutable() { // arrange @@ -193,17 +198,19 @@ Assert.IsTrue(vm.CancelCommand.CanExecute(null)); } - [Test] + [TestMethod] public void WhenNewViewModel_WithCancelExecuted_ThenShouldRaiseEvent() { // arrange var vm = CreateDefaultUserViewModel(); + bool hasMessage = false; + Messenger.Default.Register(this, message => { hasMessage = true; }); // act vm.CancelCommand.Execute(null); // assert - vm.ShouldRaise("UserViewResponseMessage"); + Assert.IsTrue(hasMessage); } #endregion diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests/ViewModels/ViewModelBaseFixture.cs --- a/SilverlightValidation/SilverlightValidation.Tests/ViewModels/ViewModelBaseFixture.cs Sun May 06 13:00:46 2012 +0100 +++ b/SilverlightValidation/SilverlightValidation.Tests/ViewModels/ViewModelBaseFixture.cs Sun May 06 16:09:28 2012 +0100 @@ -1,11 +1,9 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using NUnit.Framework; namespace SilverlightValidation.Tests.ViewModels { - [TestFixture] class ViewModelBaseFixture { diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.Tests/packages.config --- a/SilverlightValidation/SilverlightValidation.Tests/packages.config Sun May 06 13:00:46 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff -r 62477c2e8837 -r 572886951353 SilverlightValidation/SilverlightValidation.sln --- a/SilverlightValidation/SilverlightValidation.sln Sun May 06 13:00:46 2012 +0100 +++ b/SilverlightValidation/SilverlightValidation.sln Sun May 06 16:09:28 2012 +0100 @@ -7,7 +7,7 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilverlightValidation.PL", "SilverlightValidation.PL\SilverlightValidation.PL.csproj", "{13B5F568-F402-4A2A-9A23-0FDF0B5564E3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilverlightValidation.Tests", "SilverlightValidation.Tests\SilverlightValidation.Tests.csproj", "{02CCF8C7-1311-453F-BF82-3564AD9E7B8C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SilverlightValidation.Tests", "SilverlightValidation.Tests\SilverlightValidation.Tests.csproj", "{D6F19856-008B-4FD6-B5B9-B941AD1AA7B5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -27,10 +27,10 @@ {13B5F568-F402-4A2A-9A23-0FDF0B5564E3}.Debug|Any CPU.Build.0 = Debug|Any CPU {13B5F568-F402-4A2A-9A23-0FDF0B5564E3}.Release|Any CPU.ActiveCfg = Release|Any CPU {13B5F568-F402-4A2A-9A23-0FDF0B5564E3}.Release|Any CPU.Build.0 = Release|Any CPU - {02CCF8C7-1311-453F-BF82-3564AD9E7B8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {02CCF8C7-1311-453F-BF82-3564AD9E7B8C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {02CCF8C7-1311-453F-BF82-3564AD9E7B8C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {02CCF8C7-1311-453F-BF82-3564AD9E7B8C}.Release|Any CPU.Build.0 = Release|Any CPU + {D6F19856-008B-4FD6-B5B9-B941AD1AA7B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D6F19856-008B-4FD6-B5B9-B941AD1AA7B5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D6F19856-008B-4FD6-B5B9-B941AD1AA7B5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D6F19856-008B-4FD6-B5B9-B941AD1AA7B5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE