skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class MultipleReturnValueChainHelper

Provides ability to chain Returns method that returns a single value.

Inheritance
System.Object
MultipleReturnValueChainHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.JustMock.Helpers
Assembly: Telerik.JustMock.dll

Syntax

public static class MultipleReturnValueChainHelper

Methods

Returns<TReturn>(IAssertable, TReturn)

Defines the return value for a specific method expectation.

Declaration
public static IAssertable Returns<TReturn>(this IAssertable assertable, TReturn value)
Parameters
IAssertable assertable

Reference to IAssertable interface.

TReturn value

Any object value.

Returns
IAssertable

Reference to IMustBeCalled interface

Type Parameters
TReturn

Type of the return value.

ReturnsMany<TReturn>(IFunc<TReturn>, TReturn[])

Specifies that the arranged member will return consecutive values from the given array. If the arranged member is called after it has returned the last value, an exception is thrown.

Declaration
public static IAssertable ReturnsMany<TReturn>(this IFunc<TReturn> func, params TReturn[] values)
Parameters
IFunc<TReturn> func

The arranged member.

TReturn[] values

The array of values that will be returned by the arranged member.

Returns
IAssertable

Reference to IAssertable interface.

Type Parameters
TReturn

Type of the return value.

ReturnsMany<TReturn>(IFunc<TReturn>, IList<TReturn>, AfterLastValue)

Specifies that the arranged member will return consecutive values from the given array. If the arranged member is called after it has returned the last value, the behavior depends on the behavior parameter.

Declaration
public static IAssertable ReturnsMany<TReturn>(this IFunc<TReturn> func, IList<TReturn> values, AfterLastValue behavior)
Parameters
IFunc<TReturn> func

The arranged member

System.Collections.Generic.IList<TReturn> values

The list of values that will be returned by the arranged member. The list may be modified after the arrangement is made.

AfterLastValue behavior

The behavior after the last value has been returned.

Returns
IAssertable

Reference to IAssertable interface.

Type Parameters
TReturn

Type of return value

Getting Started
  • Unit Testing and Mocking Explained
  • Videos
  • FAQs
Community
  • Forums
  • Blogs
  • Feedback Portal

Copyright © 2019 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.