justmock-docs/api/methods_t_telerik_justmock_...

4.0 KiB

title page_title description previous_url slug published fullPath category
FluentHelper Methods FluentHelper Methods | JustMock Documentation Documentation page about FluentHelper Methods. /methods_t_telerik_justmock_helpers_fluenthelper.html methods_t_telerik_justmock_helpers_fluenthelper True api/n_telerik_justmock_helpers/t_telerik_justmock_helpers_fluenthelper/methods_t_telerik_justmock_helpers_fluenthelper/methods_t_telerik_justmock_helpers_fluenthelper api

FluentHelper Methods

The FluentHelper type exposes the following members.

Methods

Name Description
Public methodStatic member Arrange<T>(T, Expression<Action<T>>) Setups the target call to act in a specific way.
Public methodStatic member Arrange<T, TResult>(T, Expression<Func<T, TResult>>)
Public methodStatic member ArrangeLike<T>
Public methodStatic member ArrangeSet<T> Setups target property set operation to act in a specific way.

Examples

Mock.ArrangeSet(() =>; foo.MyValue = 10).Throws(new InvalidOperationException());

This will throw InvalidOperationException for when foo.MyValue is set with 10. | Public methodStatic member |Assert<T>(T, String) |Asserts all expected calls that are marked as must or to be occurred a certain number of times. | Public methodStatic member |Assert<T>(T, Expression<Action<T>>, String) |Asserts the specific call | Public methodStatic member |Assert<T>(T, Expression<Action<T>>, Occurs, String) |Asserts the specific call | Public methodStatic member |Assert<T, TReturn>(T, Expression<Func<T, TResult>>, Boolean) | | Public methodStatic member |Assert<T, TReturn>(T, Expression<Func<T, TResult>>, Boolean, T) | | Public methodStatic member |AssertAll<T> |Asserts all expected setups. | Public methodStatic member |Raise<T>(T, Action<T>, EventArgs) |Raises the specified event. If the event is not mocked and is declared on a C# or VB class and has the default implementation for add/remove, then that event can also be raised using this method, even with the profiler off. | Public methodStatic member |Raise<T>(T, Action<T>,Object[]) |Raises the specified event. If the event is not mocked and is declared on a C# or VB class and has the default implementation for add/remove, then that event can also be raised using this method, even with the profiler off. |

See Also

FluentHelper Class

Telerik.JustMock.Helpers Namespace