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 IFunc<TReturn>

Interface containing Func type method expectations.

Inherited Members
IThrows<IFunc<TReturn>>.Throws(Exception)
IThrows<IFunc<TReturn>>.Throws<TException>()
IThrows<IFunc<TReturn>>.Throws<TException>(Object[])
IThrows<IFunc<TReturn>>.ThrowsAsync(Exception)
IThrows<IFunc<TReturn>>.ThrowsAsync<TException>()
IThrows<IFunc<TReturn>>.ThrowsAsync<TException>(Object[])
IReturns<TReturn>.Returns<T1>(Func<T1, TReturn>)
IReturns<TReturn>.Returns<T1, T2>(Func<T1, T2, TReturn>)
IReturns<TReturn>.Returns<T1, T2, T3>(Func<T1, T2, T3, TReturn>)
IReturns<TReturn>.Returns<T1, T2, T3, T4>(Func<T1, T2, T3, T4, TReturn>)
IReturns<TReturn>.Returns<T1, T2, T3, T4, T5>(Func<T1, T2, T3, T4, T5, TReturn>)
IReturns<TReturn>.Returns<T1, T2, T3, T4, T5, T6>(Func<T1, T2, T3, T4, T5, T6, TReturn>)
IReturns<TReturn>.Returns<T1, T2, T3, T4, T5, T6, T7>(Func<T1, T2, T3, T4, T5, T6, T7, TReturn>)
IReturns<TReturn>.Returns<T1, T2, T3, T4, T5, T6, T7, T8>(Func<T1, T2, T3, T4, T5, T6, T7, T8, TReturn>)
IReturns<TReturn>.Returns<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TReturn>)
IReturns<TReturn>.Returns<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TReturn>)
IReturns<TReturn>.Returns<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TReturn>)
IReturns<TReturn>.Returns<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TReturn>)
IReturns<TReturn>.Returns<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TReturn>)
IReturns<TReturn>.Returns<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TReturn>)
IReturns<TReturn>.Returns<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TReturn>)
IReturns<TReturn>.Returns<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TReturn>)
IAssertable.CallOriginal()
IMustBeCalled.MustBeCalled(String)
ISetupBehavior.InSequence()
ISetupBehavior.OnAllThreads()
IOccurrence.Occurs(Int32, String)
IOccurrence.OccursAtLeast(Int32, String)
IOccurrence.OccursAtMost(Int32, String)
IOccurrence.OccursOnce(String)
IOccurrence.OccursNever(String)
IOrder.InOrder(String)
IPrerequisite.AfterAll(IPrerequisite[])
IPrerequisite.IsMet
System.IDisposable.Dispose()
Namespace: Telerik.JustMock.Expectations.Abstraction
Assembly: Telerik.JustMock.dll

Syntax

public interface IFunc<TReturn> : IThrows<IFunc<TReturn>>, IReturns<TReturn>, IAssertable, IMustBeCalled, ISetupBehavior, IOccurrence, IOrder, IPrerequisite, IDisposable
Type Parameters
TReturn

Methods

Returns(TReturn)

Specifies the return value for the expected method.

Declaration
IAssertable Returns(TReturn value)
Parameters
TReturn value

any object value

Returns
IAssertable

Returns(Delegate)

Specifies the delegate to evaluate and return for the expected method.

Declaration
IAssertable Returns(Delegate delegate)
Parameters
System.Delegate delegate

Target delegate to evaluate.

Returns
IAssertable

Reference to IAssertable interface

Returns(Func<TReturn>)

Specifies the delegate to evaluate and return for the expected method.

Declaration
IAssertable Returns(Func<TReturn> func)
Parameters
System.Func<TReturn> func

Target delegate to evaluate

Returns
IAssertable

Reference to IAssertable interface

ReturnsCollection<TArg>(IEnumerable<TArg>)

Returns a enumerable collection for the target query.

Declaration
IAssertable ReturnsCollection<TArg>(IEnumerable<TArg> collection)
Parameters
System.Collections.Generic.IEnumerable<TArg> collection

Enumerable collection

Returns
IAssertable

Instance of IAssertable

Type Parameters
TArg

Argument type

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)
MultipleReturnValueChainHelper.Returns<TReturn>(IAssertable, TReturn)
MultipleReturnValueChainHelper.ReturnsMany<TReturn>(IFunc<TReturn>, TReturn[])
MultipleReturnValueChainHelper.ReturnsMany<TReturn>(IFunc<TReturn>, IList<TReturn>, AfterLastValue)
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.