# HG changeset patch # User stevenhollidge # Date 1336302893 -3600 # Node ID 8cb4f36717e91f6fa0884229b1b6603dcd13578d # Parent db05a55e353698e7ffa8d9cf22ad6d52acb83d91 Fake it easy dll added diff -r db05a55e3536 -r 8cb4f36717e9 SilverlightValidation/Libs/FakeItEasy.dll Binary file SilverlightValidation/Libs/FakeItEasy.dll has changed diff -r db05a55e3536 -r 8cb4f36717e9 SilverlightValidation/Libs/FakeItEasy.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightValidation/Libs/FakeItEasy.xml Sun May 06 12:14:53 2012 +0100 @@ -0,0 +1,3403 @@ + + + + FakeItEasy + + + + + Provides methods for generating fake objects. + + + + + Creates a fake object of the type T. + + The type of fake object to create. + A fake object. + + + + Creates a fake object of the type T. + + The type of fake object to create. + A lambda where options for the built fake object cna be specified. + A fake object. + + + + Creates a collection of fakes of the specified type. + + The type of fakes to create. + The number of fakes in the collection. + A collection of fake objects of the specified type. + + + + Gets a dummy object of the specified type. The value of a dummy object + should be irrelevant. Dummy objects should not be configured. + + The type of dummy to return. + A dummy object of the specified type. + Dummies of the specified type can not be created. + + + + 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. + + + + Configures a call to a faked object. + + An expression where the configured memeber is called. + A configuration object. + + + + Gets a configuration object allowing for further configuration of + any calll to the specified faked object. + + + The fake to configure. + + + A configuration object. + + + + + Configures a call to a faked object. + + The type of member on the faked object to configure. + An expression where the configured memeber is called. + A configuration object. + + + + Provides an api entry point for constraining arguments of fake object calls. + + The type of argument to validate. + + + + Gets an argument constraint object that will be used to constrain a method call argument. + + + + + Gets a constraint that considers any value of an argument as valid. (This is a shortcut for the "Ignored"-property.) + + + + + Gets a constraint that considers any value of an argument as valid. + + + + + Provides configuration for any (not a specific) call on a faked object. + + + + + Gets a configuration object allowing for further configuration of + any calll to the specified faked object. + + The faked object to configure. + A configuration object. + + + + 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. + + + + Provides string formatting for arguments of type T when written in + call lists. + + + + + Provides string formatting for arguments when written in + call lists. + + + + + Gets a string representing the specified argument value. + + The argument value to get as a string. + A string representation of the value. + + + + The type of arguments this formatter works on. + + + + + The priority of the formatter, when two formatters are + registered for the same type the one with the highest + priority is used. + + + + + Gets a string representing the specified argument value. + + The argument value to get as a string. + A string representation of the value. + + + + Gets a string representing the specified argument value. + + The argument value to get as a string. + A string representation of the value. + + + + The type of arguments this formatter works on. + + + + + + The priority of the formatter, when two formatters are + registered for the same type the one with the highest + priority is used. + + + + + + Provides the base for rules that can be built using the FakeConfiguration. + + + + + Represents a call rule that has a description of the calls the + rule is applicable to. + + + + + Allows for intercepting call to a fake object and + act upon them. + + + + + Gets wether this interceptor is applicable to the specified + call, if true is returned the Apply-method of the interceptor will + be called. + + The call to check for applicability. + True if the interceptor is applicable. + + + + Applies an action to the call, might set a return value or throw + an exception. + + The call to apply the interceptor to. + + + + Gets the number of times this call rule is valid, if it's set + to null its infinitely valid. + + + + + Writes a description of calls the rule is applicable to. + + + + + + Gets if this rule is applicable to the specified call. + + The call to validate. + True if the rule applies to the call. + + + + Writes a description of calls the rule is applicable to. + + The writer to write the description to. + + + + An action that is called by the Apply method to apply this + rule to a fake object call. + + + + + A collection of actions that should be invoked when the configured + call is made. + + + + + Values to apply to output and reference variables. + + + + + Gets or sets wether the base mehtod of the fake object call should be + called when the fake object call is made. + + + + + The number of times the configured rule should be used. + + + + + Gets a description of calls the rule is applicable to. + + + + + + + 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 that lets the developer specify that an exception should be + thrown by a fake object call. + + + + + Hides standard Object members to make fluent interfaces + easier to read. Found in the source of Autofac: http://code.google.com/p/autofac/ + Based on blog post by @kzu here: + http://www.clariusconsulting.net/blogs/kzu/archive/2008/03/10/58301.aspx + + + + + Hides the ToString-method. + + A string representation of the implementing object. + + + + 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. + + + + + Gets the type. + + + + + + Throws the specified exception when the currently configured + call gets called. + + The exception to throw. + Configuration object. + + + + Configuration for callbacks of fake object calls. + + The type of interface to return. + + + + Executes the specified action when a matching call is being made. + + The action to invoke. + A configuration object. + + + + Allows the developer to assert on a call that's configured. + + + + + Asserts that the configured call has happened the number of times + constrained by the repeatConstraint parameter. + + A constraint for how many times the call + must have happened. + 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. + A configuration object. + + + + Provides configurations to validate arguments of a fake object call. + + The type of interface to return. + + + + Configures the call to be accepted when the specified predicate returns true. + + 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. + + The return type of the members to configure. + A configuration object. + + + + Manages registration of a set of components in a DictionaryContainer. + + + + + Registers the components of this module. + + The container to register components in. + + + + A factory that creates instances of the RecordingCallRuleType. + + + + + Creates the specified fake object. + + The type of the fake. + The fake object the rule belongs to. + The rule that's being recorded. + A RecordingCallRule instance. + + + + A factory responsible for creating start configuration for fake objects. + + + + + Creates a start configuration for the specified fake object that fakes the + specified type. + + The type of the fake object. + The fake object to configure. + A configuration object. + + + + An exception that can be thrown when something goes wrong with the configuration + of a fake object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + 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 + a call on a faked object. + + + + + Lets you set up expectations and configure repeat for the configured call. + + + + + Provides configuration for method calls that has a return value. + + + + + Specifies the number of times for the configured event. + + The number of times to repeat. + + + + A combination of the IAfterCallSpecifiedConfiguration and IOutAndRefParametersConfiguration + interfaces. + + + + + Configurations for when a configured call is recorded. + + + + + Provides configuration from VisualBasic. + + + + + Provides methods for configuring a fake object. + + The type of fake object. + + + + 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. + A configuration object. + + + + Configures the behavior of the fake object when a call that matches the specified + call happens. + + An expression that specifies the calls to configure. + A configuration object. + + + + Configures the behavior of the fake object whan a call is made to any method on the + object. + + A configuration object. + + + + A call rule that has been recorded. + + + + + A call rule that "sits and waits" for the next call, when + that call occurs the recorded rule is added for that call. + + + + + Provides access to a set of calls and a call matcher for these calls. + + + + + Provides access to a call matcher. + + + + + Gets a call predicate that can be used to check if a fake object call matches + the specified constraint. + + + + + A set of calls. + + + + + Represents a delegate that creates a configuration object from + a fake object and the rule to build. + + The fake object the rule is for. + The rule that's being built. + A configuration object. + + + + Represents a predicate that matches a fake object call. + + + + + Gets a value indicating whether the call matches the predicate. + + The call to match. + True if the call matches the predicate. + + + + Represents an argument and a dummy value to use for that argument. + + + + + Initializes a new instance of the class. + + A value indicating if the dummy value was successfully resolved. + The type of argument. + The resolved value. + + + + Gets a value indicating if a dummy argument value was successfully + resolved. + + + + + Gets the type of the argument. + + + + + Gets the resolved value. + + + + + Represents an event that happens when a call has been intercepted by a proxy. + + + + + Initializes a new instance of the class. + + The call. + + + + Gets the call that was intercepted. + + The call. + + + + Keeps track of metadata for interceptions. + + + + + Gets whether the rule has been called the number of times specified or not. + + True if the rule has not been called the number of times specified. + + + + Gets or sets the number of times the rule has been used. + + + + + Gets or sets the rule this metadata object is tracking. + + + + + Manages attaching of argument constraints. + + The type of argument to constrain. + + + + Constrains the argument with a predicate. + + The predicate that should constrain the argument. + An action that will be write a description of the constraint. + A dummy argument value. + + + + Inverts the logic of the matches method. + + + + + Validates an argument, checks that it's valid in a specific fake call. + + + + + Writes a description of the arguemnt constraint to the specified writer. + + + The writer. + + + + + Gets whether the argument is valid. + + The argument to validate. + True if the argument is valid. + + + + Default implementation of the fake manager attacher. + + + + + Attaches a fake manager to the proxy so that intercepted + calls can be configured. + + + + + Attaches a fakemanager to the specified proxy, listening to + the event raiser. + + The proxy to attach to. + The type of the fake object proxy. + The event raiser to listen to. + + + + Gets the fake manager associated with the proxy. + + The proxy to get the manager from. + A fake manager + + + + Attaches a fakemanager to the specified proxy, listening to + the event raiser. + + The type of the fake object proxy. + The proxy to attach to. + The event raiser to listen to. + + + + Gets the fake manager associated with the proxy. + + The proxy to get the manager from. + A fake manager + + + + Represents an object that can be tagged with another object. When implemented + by a proxy returned from an FakeItEasy uses the tag + to store a reference to the that handles that proxy. + + + + + Gets or sets the tag for the taggable object. + + + + + The default implementation of the IFakeObjectCallFormatter interface. + + + + + Provides string formatting for fake object calls. + + + + + Gets a human readable description of the specified + fake object call. + + The call to get a description for. + A description of the call. + + + + Gets a human readable description of the specified + fake object call. + + The call to get a description for. + A description of the call. + + + + Handles configuring of fake objects to delegate all their calls to a wrapped instance. + + + + + Manages configuration of fake objects to wrap instances. + + + + + Configures the specified faked object to wrap the specified instance. + + The faked object to configure. + The instance to wrap. + The recorder to use, null if no recording should be made. + + + + Configures the specified faked object to wrap the specified instance. + + The faked object to configure. + The instance to wrap. + The recorder to use, null if no recording should be made. + + + + A fake object container where delegates can be registered that are used to + resolve fake objects. + + + + + A container that can create fake objects. + + + + + Handles global configuration of fake object. + + + + + Applies base configuration to a fake object. + + The type the fake object represents. + The fake object to configure. + + + + Creates a dummy object of the specified type using the specified arguments if it's + supported by the container, returns a value indicating if it's supported or not. + + The type of dummy object to create. + The dummy object that was created if the method returns true. + True if a dummy object can be created. + + + + Initializes a new instance of the class. + Creates a new instance of the DelegateFakeObjectContainer. + + + + + Creates a fake object of the specified type using the specified arguments if it's + supported by the container, returns a value indicating if it's supported or not. + + The type of dummy object to create. + The fake object that was created if the method returns true. + True if a fake object can be created. + + + + Configures the fake. + + The type of fake. + The fake object. + + + + Registers the specified fake delegate. + + + The fake delegate. + + + + A IFakeObjectContainer implementation that uses mef to load IFakeDefinitions and + IFakeConfigurations. + + + + + Initializes a new instance of the class. + + + + + Creates a fake object of the specified type using the specified arguments if it's + supported by the container, returns a value indicating if it's supported or not. + + The type of fake object to create. + The fake object that was created if the method returns true. + True if a fake object can be created. + + + + Applies base configuration to a fake object. + + The type the fake object represents. + The fake object to configure. + + + + An exception that is thrown when there was an error creating a fake object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + 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 + of fake object calls by using a set of rules. User defined rules can be inserted + by using the AddRule-method. + + + + + Initializes a new instance of the class. + + + + + Adds a call rule to the fake object. + + The rule to add. + + + + Adds a call rule last in the list of user rules, meaning it has the lowest priority possible. + + The rule to add. + + + + Removes the specified rule for the fake object. + + The rule to remove. + + + + Adds an interception listener to the manager. + + The listener to add. + + + + Removes any specified user rules. + + + + + Gets the faked object. + + + + + Gets the faked type. + + + + + Gets the interceptions that are currently registered with the fake object. + + + + + Gets a collection of all the calls made to the fake object within the current scope. + + + + + A delegate responsible for creating FakeObject instances. + + + + + + Represents a call to a fake object at interception time. + + + + + Represents a fake object call that can be edited. + + + + + Represents a call to a fake object. + + + + + The method that's called. + + + + + The arguments used in the call. + + + + + The faked object the call is performed on. + + + + + Sets the return value of the call. + + The return value to set. + + + + Calls the base method of the faked type. + + + + + Sets the value of the argument at the specified index in the parameters list. + + The index of the argument to set the value of. + The value to set to the argument. + + + + Freezes the call so that it can no longer be modified. + + A completed fake object call. + + + + Sets that the call should not be recorded by the fake manager. + + + + + Represents a scope for fake objects, calls configured within a scope + are only valid within that scope. Only calls made wihtin a scope + are accessible from within a scope so for example asserts will only + assert on those calls done within the scope. + + + + + Provides access to all calls made to fake objects within a scope. + Scopes calls so that only calls made within the scope are visible. + + + + + Creates a new scope and sets it as the current scope. + + The created scope. + + + + Creates a new scope and sets it as the current scope, using the specified + container as the container for the new scope. + + The container to usee for the new scope. + The created scope. + + + + Closes the scope. + + + + + Adds an intercepted call to the current scope. + + The fake object. + The call that is intercepted. + + + + Adds a fake object call to the current scope. + + The fake object. + The rule to add. + + + + Represents a listener for fake object calls, can be plugged into a + FakeManager instance to listen to all intercepted calls. + + The OnBeforeCallIntercepted method will be invoked before the OnBeforeCallIntercepted method of any + previously added listener. The OnAfterCallIntercepted method will be invoked after the OnAfterCallIntercepted + method of any previously added listener. + + + + Called when the interception begins but before any call rules + has been applied. + + The intercepted call. + + + + Called when the interception has been completed and rules has been + applied. + + 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. + + + + + Gets a value indicating if the two method infos would invoke the same method + if invoked on an instance of the target type. + + The type of target for invokation. + The first MethodInfo. + The second MethodInfo. + True if the same method would be invoked. + + + + A null implementation for the IFakeObjectContainer interface. + + + + + Always returns false and sets the fakeObject to null. + + The type of dummy object to create. + Output variable for the fake object that will always be set to null. + Always return false. + + + + Applies base configuration to a fake object. + + The type the fake object represents. + The fake object to configure. + + + + Initializes a new instance of the class. + + The calls. + The call writer. + + + + Asserts the was called. + + The call predicate. + The call description. + The repeat predicate. + The repeat description. + + + + A call rule that applies to any call and just delegates the + call to the wrapped object. + + + + + Initializes a new instance of the class. + Creates a new instance. + + + The object to wrap. + + + + + Gets wether this interceptor is applicable to the specified + call, if true is returned the Apply-method of the interceptor will + be called. + + The call to check for applicability. + True if the interceptor is applicable. + + + + Applies an action to the call, might set a return value or throw + an exception. + + The call to apply the interceptor to. + + + + Gets the number of times this call rule is valid, if it's set + to null its infinitely valid. + + + + + + An adapter that adapts an to a . + + + + + Initializes a new instance of the class. + + The invocation. + + + + Freezes the call so that it can no longer be modified. + + A completed fake object call. + + + + Calls the base method, should not be used with interface types. + + + + + Sets the specified value to the argument at the specified index. + + The index of the argument to set the value to. + The value to set to the argument. + + + + Sets the return value of the call. + + The return value. + + + + Returns a description of the call. + + + A that represents this instance. + + + + + A human readable description of the call. + + + + + + The value set to be returned from the call. + + + + + The method that's called. + + + + + The arguments used in the call. + + + + + The faked object the call is performed on. + + + + + 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 No constructor matches the passed arguments for constructor.. + + + + + Looks up a localized string similar to Arguments for constructor specified for interface type.. + + + + + Looks up a localized string similar to The type of proxy "{0}" is sealed.. + + + + + Looks up a localized string similar to The type of proxy must be an interface or a class but it was {0}.. + + + + + Looks up a localized string similar to No default constructor was found on the type {0}.. + + + + + The default implementation of the IFakeAndDummyManager interface. + + + + + Handles the creation of fake and dummy objects. + + + + + Creates a dummy of the specified type. + + The type of dummy to create. + The created dummy. + The current IProxyGenerator is not able to generate a fake of the specified type and + the current IFakeObjectContainer does not contain the specified type. + + + + Creates a fake object of the specified type. + + The type of fake object to generate. + Options for building the fake object. + A fake object. + The current IProxyGenerator is not able to generate a fake of the specified type. + + + + Tries to create a dummy of the specified type. + + The type of dummy to create. + Outputs the result dummy when creation is successful. + A value indicating whether the creation was successful. + + + + Tries to create a fake object of the specified type. + + The type of fake to create. + Options for the creation of the fake. + The created fake object when creation is successful. + A value indicating whether the creation was successful. + + + + Default implementation ofthe IFakeCreator-interface. + + + + + A facade used by the public api for testability. + + + + + Creates a fake object of the specified type. + + The type of fake to create. + Options for the created fake object. + The created fake object. + Was unable to generate the fake in the current configuration. + + + + Creates a dummy object, this can be a fake object or an object resolved + from the current IFakeObjectContainer. + + The type of dummy to create. + The created dummy. + Was unable to generate the fake in the current configuration and + no dummy was registered in the container for the specifed type.. + + + + Creates a collection of fakes of the specified type. + + The type of fakes to create. + The number of fakes in the collection. + A collection of fake objects of the specified type. + + + + Initializes a new instance of the class. + + The fake and dummy manager. + + + + Creates a fake object of the specified type. + + The type of fake to create. + Options for the created fake object. + The created fake object. + Was unable to generate the fake in the current configuration. + + + + Creates a collection of fakes of the specified type. + + The type of fakes to create. + The number of fakes in the collection. + + A collection of fake objects of the specified type. + + + + + Creates a dummy object, this can be a fake object or an object resolved + from the current IFakeObjectContainer. + + The type of dummy to create. + The created dummy. + Was unable to generate the fake in the current configuration and + no dummy was registered in the container for the specifed type.. + + + + Provides options for fake wrappers. + + The type of the fake object generated. + + + + Provides options for generating fake object. + + The type of fake object generated. + + + + Specifies arguments for the constructor of the faked class. + + The arguments to pass to the consturctor of the faked class. + Options object. + + + + Specifies arguments for the constructor of the faked class by giving an expression with the call to + the desired constructor using the arguments to be passed to the constructor. + + The constructor call to use when creating a class proxy. + Options object. + + + + Specifies that the fake should delegate calls to the specified instance. + + The object to delegate calls to. + Options object. + + + + Sets up the fake to implement the specified interface in addition to the + originally faked class. + + The type of interface to implement. + Options object. + The specified type is not an interface. + The specified type is null. + + + + Specifies an action that should be run over the fake object + once it's created. + + An action to perform. + Options object. + + + + Specifies a fake recorder to use. + + The recorder to use. + Options object. + + + + Initializes a new instance of the class. + + The container. + The fake object creator. + + + + Contains the result of a call to TryCreateProxy of IProxyGenerator. + + + + + Initializes a new instance of the class. + Creates a new instance representing a failed proxy + generation attempt. + + + The reason the proxy generation failed. + + + + + Initializes a new instance of the class. + Creates a new instance representing a successful proxy + generation. + + + The proxy that was generated. + + + An event raiser that raises + events when calls are intercepted to the proxy. + + + + + Gets a value indicating if the proxy was successfully created. + + + + + Gets the generated proxy when it was successfully created. + + + + + Gets the event raiser that raises events when calls to the proxy are + intercepted. + + + + + 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 definition of how a fake object of the type T should + be created. + + The type of fake. + + + + Represents a definition of how dummies of the specified type should be created. + + + + + Creates the fake. + + The fake object. + + + + The type of fake object the definition is for. + + + + + Creates the dummy. + + The dummy object. + + + + Creates the dummy. + + The dummy object. + + + + Gets the type the definition is for. + + 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. + + + + + 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 The Apply method of the ExpressionInterceptor may no be called before the Applicator property has been set.. + + + + + Looks up a localized string similar to The specified argument name does not exist in the ArgumentList.. + + + + + Looks up a localized string similar to Arguments for constructor was specified when generating proxy of interface type.. + + + + + Looks up a localized string similar to An argument validation was not configured correctly.. + + + + + Looks up a localized string similar to The method '{0}' was called too few times, expected #{1} times but was called #{2} times.. + + + + + Looks up a localized string similar to The method '{0}' was called too many times, expected #{1} times but was called #{2} times.. + + + + + Looks up a localized string similar to Can not create fake of the type '{0}', it's not registered in the current container and the current IProxyGenerator can not generate the fake. + + The following constructors failed: + {1}. + + + + + Looks up a localized string similar to Error when accessing FakeObject, the specified argument is of the type '{0}' which is not faked.. + + + + + Looks up a localized string similar to An ExpressionCallMatcher can only be created for expressions that represents a method call or a property getter.. + + + + + Looks up a localized string similar to The current proxy generator failed to create a proxy with the specified arguments for the constructor: + + Reason for failure: + - {0}. + + + + + Looks up a localized string similar to FakeItEasy failed to create fake object of type "{0}". + + 1. The type is not registered in the current IFakeObjectContainer. + 2. The current IProxyGenerator failed to generate a proxy for the following reason: + + {1}. + + + + + Looks up a localized string similar to Unable to create fake object.. + + + + + Looks up a localized string similar to Only abstract classes can be faked using the A.Fake-method that takes an enumerable of objects as arguments for constructor, use the overload that takes an expression instead.. + + + + + Looks up a localized string similar to The member accessor expression must be a lambda expression with a MethodCallExpression or MemberAccessExpression as its body.. + + + + + Looks up a localized string similar to The specified method can not be configured since it can not be intercepted by the current IProxyGenerator.. + + + + + Looks up a localized string similar to The method of the call did not match the method of the recorded call, the recorded sequence is no longer valid.. + + + + + Looks up a localized string similar to No constructor matching the specified arguments was found on the type {0}.. + + + + + Looks up a localized string similar to Can not generate fake object for the class since no default constructor was found, specify a constructor call.. + + + + + Looks up a localized string similar to All the recorded calls has been applied, the recorded sequence is no longer valid.. + + + + + Looks up a localized string similar to Only expression of the type ExpressionType.New (constructor calls) are accepted.. + + + + + Looks up a localized string similar to The Now-method on the event raise is not meant to be called directly, only use it to register to an event on a fake object that you want to be raised.. + + + + + Looks up a localized string similar to The number of values for out and ref parameters specified does not match the number of out and ref parameters in the call.. + + + + + Looks up a localized string similar to A scope for ordered assertions is already opened, close that scope before opening another one.. + + + + + Looks up a localized string similar to The specified call is not made on a fake object.. + + + + + Looks up a localized string similar to The current fake proxy generator can not create proxies of the type {0}.. + + + + + Looks up a localized string similar to FakeItEasy was unable to create dummy of type "{0}", register it in the current IFakeObjectContainer to enable this.. + + + + + Looks up a localized string similar to Expected to find call {0} the number of times specified by the predicate '{1}' but found it {2} times among the calls:. + + + + + 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). + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + 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). + + + + + Provides extension methods for fake objects. + + + + + Specifies NumberOfTimes(1) to the IRepeatConfiguration{TFake}. + + The configuration to set repeat 1 to. + + + + Specifies NumberOfTimes(2) to the IRepeatConfiguration{TFake}. + + The configuration to set repeat 2 to. + + + + Specifies that a call to the configured call should be applied no matter what arguments + are used in the call to the faked object. + + The configuration. + A configuration object + + + + Filters to contain only the calls that matches the call specification. + + The type of fake the call is made on. + The calls to filter. + The call to match on. + A collection of the calls that matches the call specification. + + + + Asserts that the specified call must have happened once or more. + + The configuration to assert on. + + + + Asserts that the specified has not happened. + + The configuration to assert on. + + + + Configures the call to return the next value from the specified sequence each time it's called. Null will + be returned when all the values in the sequence has been returned. + + + The type of return value. + + + The call configuration to extend. + + + The values to return in sequence. + + + + + Specifies the value to return when the configured call is made. + + The value to return. + The configuration to extend. + A configuration object. + + + + 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. + The configuration to extend. + A configuration object. + + + + 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. + The configuration to extend. + Type of the first argument of the faked method call + The type of the return value. + A configuration object. + when the signatures of the faked method and the do not match + + + + 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. + The configuration to extend. + Type of the first argument of the faked method call + Type of the second argument of the faked method call + The type of the return value. + A configuration object. + when the signatures of the faked method and the do not match + + + + 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. + The configuration to extend. + Type of the first argument of the faked method call + Type of the second argument of the faked method call + Type of the third argument of the faked method call + The type of the return value. + A configuration object. + when the signatures of the faked method and the do not match + + + + 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. + The configuration to extend. + Type of the first argument of the faked method call + Type of the second argument of the faked method call + Type of the third argument of the faked method call + Type of the fourth argument of the faked method call + The type of the return value. + A configuration object. + when the signatures of the faked method and the do not match + + + + Writes the calls in the collection to the specified text writer. + + The calls to write. + The writer to write the calls to. + + + + Writes all calls in the collection to the console. + + The calls to write. + + + + Gets the argument at the specified index in the arguments collection + for the call. + + The type of the argument to get. + The call to get the argument from. + The index of the argument. + The value of the argument with the specified index. + + + + Gets the argument with the specified name in the arguments collection + for the call. + + The type of the argument to get. + The call to get the argument from. + The name of the argument. + The value of the argument with the specified name. + + + + Makes the fake strict, this means that any call to the fake + that has not been explicitly configured will throw an exception. + + The type of fake object. + The configuration. + A configuration object. + + + + Applies a predicate to constrain which calls will be considered for interception. + + + The return type of the where method. + + + The configuration object to extend. + + + A predicate for a fake object call. + + to the output. + + The configuration object. + + + + + Executes the specified action when a matching call is being made. This overload can also be used to fake calls with arguments when they don't need to be accessed. + + The configuration that is extended. + The to invoke + The type of fake object. + + + + Executes the specified action when a matching call is being made. + + The configuration that is extended. + The to invoke + Type of the first argument of the faked method call + The type of fake object. + when the signatures of the faked method and the do not match + + + + Executes the specified action when a matching call is being made. + + The configuration that is extended. + The to invoke + Type of the first argument of the faked method call + Type of the second argument of the faked method call + The type of fake object. + when the signatures of the faked method and the do not match + + + + Executes the specified action when a matching call is being made. + + The configuration that is extended. + The to invoke + Type of the first argument of the faked method call + Type of the second argument of the faked method call + Type of the third argument of the faked method call + The type of fake object. + when the signatures of the faked method and the do not match + + + + Executes the specified action when a matching call is being made. + + The configuration that is extended. + The to invoke + Type of the first argument of the faked method call + Type of the second argument of the faked method call + Type of the third argument of the faked method call + Type of the fourth argument of the faked method call + 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. + + + + + Throws an exception if the specified argument is null. + + The argument. + Name of the argument. + The specified argument was null. + + + + Throws an exception if the specified argument is not in the given range. + + + The argument. + The lower bound. + The upper bound. + Name of the argument. + The specified argument was not in the given range. + + + + Throws an ArgumentNullException if the specified string is null or empty. + + 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. + + + + + Allows the developer to raise an event on a faked object. + + + + + Raises an event on a faked object by attatching the event handler produced by the method + to the event that is to be raised. + + The type of the event args. + The sender of the event. + The instance containing the event data. + A Raise(TEventArgs)-object that exposes the eventhandler to attatch. + + + + Raises an event on a faked object by attatching the event handler produced by the method + to the event that is to be raised. + + The type of the event arguments. + The instance containing the event data. + + A Raise(TEventArgs)-object that exposes the eventhandler to attatch. + + + + + Raises an event with empty event arguments on a faked object by attatching the event handler produced by the method + to the event that is to be raised. + + + A Raise(TEventArgs)-object that exposes the eventhandler to attatch. + + + + + A class exposing an event handler to attatch to an event of a faked object + in order to raise that event. + + The type of the event args. + + + + Register this event handler to an event on a faked object in order to raise that event. + + The sender of the event. + Event args for the event. + + + + Gets a generic event handler to attatch to the event to raise. + + + + + Handles the registration of root dependencies in an IoC-container. + + + + + Registers the dependencies. + + The container to register the dependencies in. + + + + DTO for recorded calls. + + + + + Initializes a new instance of the class. + + The method. + The output arguments. + The return value. + + + + Gets the method that was called. + + The method. + + + + Gets the output arguments of the call. + + The output arguments. + + + + Gets the return value of the call. + + The return value. + + + + Represents storage for recorded calls for self initializing + fakes. + + + + + 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. + + + + 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. + + + + + Applies the call if the call has been recorded. + + The call to apply to from recording. + + + + Records the specified call. + + The call to record. + + + + Gets a value indicating if the recorder is currently recording. + + + + + An exception that can be thrown when recording for self initialized + fakes fails or when playback fails. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + 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 + using self initialized fakes. + + + + + Initializes a new instance of the class. + + The storage. + + + + Applies the call if the call has been recorded. + + The call to apply to from recording. + + + + Records the specified call. + + The call to record. + + + + Saves all recorded calls to the storage. + + + + + Gets a value indicating if the recorder is currently recording. + + + + + + Represents a factory responsible for creating recording manager + instances. + + The storage the manager should use. + A RecordingManager instance. + + + + A call rule use for self initializing fakes, delegates call to + be applied by the recorder. + + + + + Initializes a new instance of the class. + + The wrapped rule. + The recorder. + + + + Gets wether this interceptor is applicable to the specified + call, if true is returned the Apply-method of the interceptor will + be called. + + The call to check for applicability. + True if the interceptor is applicable. + + + + Applies an action to the call, might set a return value or throw + an exception. + + The call to apply the interceptor to. + + + + Gets the number of times this call rule is valid, if it's set + to null its infinitely valid. + + + + + + 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 + code smell. + + + + + 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. + + + + diff -r db05a55e3536 -r 8cb4f36717e9 SilverlightValidation/SilverlightValidation.Tests/ViewModels/UserListViewModelTests.cs --- a/SilverlightValidation/SilverlightValidation.Tests/ViewModels/UserListViewModelTests.cs Sun May 06 12:13:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -using System; -using NUnit.Framework; - -namespace SilverlightValidation.Tests.ViewModels -{ - [TestFixture] - class UserListViewModelTests - { - [Test] - public void Given_When_Then() - { - Assert.True(true); - } - } -} diff -r db05a55e3536 -r 8cb4f36717e9 SilverlightValidation/SilverlightValidation.Tests/ViewModels/UserViewModelTests.cs --- a/SilverlightValidation/SilverlightValidation.Tests/ViewModels/UserViewModelTests.cs Sun May 06 12:13:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -using System; -using FluentAssertions.EventMonitoring; -using NUnit.Framework; -using SilverlightValidation.Models; -using SilverlightValidation.Validators; -using SilverlightValidation.ViewModels; - -namespace SilverlightValidation.Tests.ViewModels -{ - [TestFixture] - class UserViewModelTests - { - #region Constructor - - [Test] - public void Constructor_WhenTwoNulls_ThenArgumentNullExceptionForModel() - { - Assert.Throws(() => new UserViewModel(null, null), "model"); - } - - [Test] - public void Constructor_WhenFirstParameterIsNull_ThenArgumentNullExceptionForModel() - { - Assert.Throws(() => new UserViewModel(null, new UserModelValidator()), "model"); - } - - [Test] - public void Constructor_WhenSecondParameterIsNull_ThenArgumentNullExceptionForValidator() - { - Assert.Throws(() => new UserViewModel(new UserModel(), null), "validator"); - } - - #endregion - - #region INotifyPropertyChanged - - [Test] - public void PropertyChange_WhenDateOfBirthUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() - { - // arrange - var vm = CreateDefaultUserViewModel(); - vm.MonitorEvents(); - - // act - vm.DateOfBirth = new DateTime(1977, 01, 01); - - // assert - vm.ShouldRaisePropertyChangeFor(x => x.DateOfBirth); - Assert.IsTrue(vm.IsChanged); - } - - [Test] - public void PropertyChange_WhenDescriptionUpdated_ThenFiresChangeEventAndIsChangedEqualsTrue() - { - // arrange - var vm = CreateDefaultUserViewModel(); - vm.MonitorEvents(); - - // act - vm.Description = "New description"; - - // assert - vm.ShouldRaisePropertyChangeFor(x => x.Description); - Assert.IsTrue(vm.IsChanged); - } - - #endregion - - #region INotifyDataErrorInfo - - #endregion - - #region Commands - - #endregion - - #region Helpers - - private static UserViewModel CreateDefaultUserViewModel() - { - var vm = new UserViewModel(new UserModel(), new UserModelValidator()); - return vm; - } - - #endregion - } -} diff -r db05a55e3536 -r 8cb4f36717e9 SilverlightValidation/SilverlightValidation.Tests/ViewModels/ViewModelBaseTests.cs --- a/SilverlightValidation/SilverlightValidation.Tests/ViewModels/ViewModelBaseTests.cs Sun May 06 12:13:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using NUnit.Framework; - -namespace SilverlightValidation.Tests.ViewModels -{ - [TestFixture] - class ViewModelBaseTests - { - - } -}