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

Interface INonPublicRefReturnExpectation

Defines methods to mock non-public ref return members.

Namespace: Telerik.JustMock.Expectations.Abstraction
Assembly: Telerik.JustMock.dll

Syntax

public interface INonPublicRefReturnExpectation
Remarks

Overloads required generic arguments which are converted internally to references. For more information about arranging non public expectations see INonPublicExpectation interface.

Methods

Arrange<TRefReturn>(Object, String, Object[])

Arranges a method for mocking.

Declaration
FuncExpectation<TRefReturn> Arrange<TRefReturn>(object target, string memberName, params object[] args)
Parameters
System.Object target

Target instance.

System.String memberName

Target member name

System.Object[] args

Method arguments

Returns
FuncExpectation<TRefReturn>

Type Parameters
TRefReturn

Ref return type

Arrange<TRefReturn>(Type, String, Object[])

Arranges a method for mocking.

Declaration
FuncExpectation<TRefReturn> Arrange<TRefReturn>(Type targetType, string memberName, params object[] args)
Parameters
System.Type targetType

Target type

System.String memberName

Target member name

System.Object[] args

Method arguments

Returns
FuncExpectation<TRefReturn>

Type Parameters
TRefReturn

Ref return type

Arrange<T, TRefReturn>(String, Object[])

Arranges a method for mocking.

Declaration
FuncExpectation<TRefReturn> Arrange<T, TRefReturn>(string memberName, params object[] args)
Parameters
System.String memberName

Target member name

System.Object[] args

Method arguments

Returns
FuncExpectation<TRefReturn>

Type Parameters
T

Target type

TRefReturn

Ref return type

Assert<TRefReturn>(Object, String, Object[])

Asserts the specified member that it is called as expected.

Declaration
void Assert<TRefReturn>(object target, string memberName, params object[] args)
Parameters
System.Object target

Target mock

System.String memberName

Name of the member

System.Object[] args

Method arguments

Type Parameters
TRefReturn

Ref return type

Assert<TRefReturn>(Object, String, Occurs, Object[])

Asserts the specified member that it is called as expected.

Declaration
void Assert<TRefReturn>(object target, string memberName, Occurs occurs, params object[] args)
Parameters
System.Object target

Target mock

System.String memberName

Name of the member

Occurs occurs

Specifies the number of times a call should occur.

System.Object[] args

Method arguments

Type Parameters
TRefReturn

Ref return type

Assert<TRefReturn>(Type, String, Object[])

Asserts the specified member that it is called as expected.

Declaration
void Assert<TRefReturn>(Type targetType, string memberName, params object[] args)
Parameters
System.Type targetType

Type of the target

System.String memberName

Name of the member

System.Object[] args

Method arguments

Type Parameters
TRefReturn

Ref return type

Assert<TRefReturn>(Type, String, Occurs, Object[])

Asserts the specified member that it is called as expected.

Declaration
void Assert<TRefReturn>(Type targetType, string memberName, Occurs occurs, params object[] args)
Parameters
System.Type targetType

Type of the target

System.String memberName

Name of the member

Occurs occurs

Specifies the number of times a call should occur.

System.Object[] args

Method arguments

Type Parameters
TRefReturn

Ref return type

Assert<T, TRefReturn>(String, Object[])

Asserts the specified member that it is called as expected.

Declaration
void Assert<T, TRefReturn>(string memberName, params object[] args)
Parameters
System.String memberName

Name of the member

System.Object[] args

Method arguments

Type Parameters
T

Specify the target type

TRefReturn

Ref return type

Assert<T, TRefReturn>(String, Occurs, Object[])

Asserts the specified member that it is called as expected.

Declaration
void Assert<T, TRefReturn>(string memberName, Occurs occurs, params object[] args)
Parameters
System.String memberName

Name of the member

Occurs occurs

Specifies the number of times a call should occur.

System.Object[] args

Method arguments

Type Parameters
T

Specify the target type

TRefReturn

Ref return type

GetTimesCalled<TRefReturn>(Object, String, Object[])

Returns the number of times the specified member was called.

Declaration
int GetTimesCalled<TRefReturn>(object target, string memberName, params object[] args)
Parameters
System.Object target

Target mock

System.String memberName

Name of the member

System.Object[] args

Method arguments

Returns
System.Int32

Number of calls.

Type Parameters
TRefReturn

Ref return type

GetTimesCalled<TRefReturn>(Type, String, Object[])

Returns the number of times the specified member was called.

Declaration
int GetTimesCalled<TRefReturn>(Type targetType, string memberName, params object[] args)
Parameters
System.Type targetType

Type of the target

System.String memberName

Name of the member

System.Object[] args

Method arguments

Returns
System.Int32

Number of calls.

Type Parameters
TRefReturn

GetTimesCalled<T, TRefReturn>(String, Object[])

Returns the number of times the specified member was called.

Declaration
int GetTimesCalled<T, TRefReturn>(string memberName, params object[] args)
Parameters
System.String memberName

Name of the member

System.Object[] args

Method arguments

Returns
System.Int32

Number of calls.

Type Parameters
T

Specify the target type

TRefReturn

Extension Methods

FluentHelper.Arrange<T, TResult>(T, Expression<Func<T, TResult>>)
FluentHelper.Arrange<T>(T, Expression<Action<T>>)
FluentHelper.ArrangeSet<T>(T, Action<T>)
FluentHelper.ArrangeLike<T>(T, Expression<Func<T, Boolean>>)
FluentHelper.Assert<T, TReturn>(T, Expression<Func<T, TReturn>>, String)
FluentHelper.Assert<T, TReturn>(T, Expression<Func<T, TReturn>>, Occurs, String)
FluentHelper.Assert<T>(T, Expression<Action<T>>, String)
FluentHelper.Assert<T>(T, Expression<Action<T>>, Occurs, String)
FluentHelper.AssertSet<T>(T, Action<T>, String)
FluentHelper.AssertSet<T>(T, Action<T>, Occurs, String)
FluentHelper.Raise<T>(T, Action<T>, EventArgs)
FluentHelper.Raise<T>(T, Action<T>, Object[])
FluentHelper.Assert<T>(T, String)
FluentHelper.AssertAll<T>(T, String)
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.