Unplanned
Last Updated: 03 Jan 2024 10:13 by Drew
Created by: Drew
Comments: 0
Type: Feature Request
1

There are no ReturnsAsync methods for mocking container async methods.

There should be a set of methods to mock async methods of a container similar to regular object mocking.

As a user I should be able to write code like:

 

container.Arrange<IContainer>(r => r.SomeAsyncMethod("data")).ReturnsAsync("returnValue");

Unplanned
Last Updated: 30 Nov 2023 08:54 by Christian
This request is about making feature parity with the existing functionality that currently supports C#.
Unplanned
Last Updated: 04 Oct 2023 06:56 by Davy
Created by: Davy
Comments: 0
Type: Feature Request
0

Provide support for .NET MAUI projects. 

Let me explain in details the current situation:

I have Unit Test project using JustMock and running into a problem. It seems like JustMock is using the wrong version number to locate the SDK. let me explain:

The project is set to: <TargetFramework>net7.0</TargetFramework>

But it also has <UseMaui>true</UseMaui> enabled

I am getting the following error:

"Framework: 'Microsoft.Maui.Core', version '7.0.92' (x64)
.NET location: C:\Program Files\dotnet
No frameworks were found.

That 7.0.92 version is only for the MAUI workload version, not the SDK versions. It seems JustMock uses a workload version as a SDK version. 

Unplanned
Last Updated: 27 Jun 2023 09:47 by Ivo
Created by: Ivo
Comments: 0
Type: Feature Request
1
In-Assembly Parallel (IAP) significantly reduces the time for test execution, but currently JustMock does not support it.
Under Review
Last Updated: 26 Jun 2023 10:30 by Yosi
Created by: Yosi
Comments: 2
Type: Feature Request
1

Hi.

i saw this: https://www.telerik.com/forums/how-can-i-mock-multiple-instances-of-a-struct

but still dont understand why JustMock works that way in the first place. why does it union struct mocks by value?

the above solution is only possible when i mock a struct i can change (and then add the id to it) but what about struct's from the framework that i cannot control? Is there a way to tell JustMock not to union mock structs?

Thanks,

Yosi

Unplanned
Last Updated: 25 Apr 2023 15:53 by Ivo
Created by: Ivo
Comments: 0
Type: Feature Request
1

JustMock interprets anonymous types as tuples. The sample below demonstrates the issue:

public interface IAnsweringService
{
    (int code, string desc) GetAnswer(string question);
}


[TestMethod]
public void AnswerToTheUniverseQuestionTest()
{
    var apiMock = Mock.Create<IAnsweringService>();

    var expectedAnswer = new { code = 42, desc = "Answer to the Ultimate Question of Life" };

    Mock.Arrange(() => apiMock.GetAnswer(Arg.AnyString)).Returns(expectedAnswer);

    var actualAnswer = apiMock.GetAnswer("What is a universe question answer?");

    Assert.AreEqual(expectedAnswer.code, actualAnswer.code);
    Assert.AreEqual(expectedAnswer.desc, actualAnswer.desc);
}
The test fails with error:

Telerik.JustMock.Core.MockException: The chained return value type '<>f__AnonymousType1`2[System.Int32,System.String]' is not compatible with the arranged method's return type 'System.ValueTuple`2[System.Int32,System.String]'

Unplanned
Last Updated: 19 Apr 2023 09:59 by Ivo
Created by: Ivo
Comments: 0
Type: Feature Request
0
The DoInstead API cannot be used in scenarios that require the method call arguments to be captured and a specific return value to be provided.
Unplanned
Last Updated: 10 Nov 2022 09:40 by Ivo
Mocking of these methods could not be made due to compiler (CS8175) or runtime (System.InvalidProgramException: Cannot create boxed ByRef-like values) errors.
Completed
Last Updated: 30 Nov 2023 08:51 by ADMIN
Extend the capabilities for the creation of mock scenarios from the Visual Studio quick-action menu
Unplanned
Last Updated: 04 Jul 2022 11:41 by Ivo
Created by: Ivo
Comments: 0
Type: Feature Request
1

The threading model of UI apps differs from the test host and this might become a source of issues like the following: System.InvalidOperationException: "The calling thread must be STA, because many UI components require this". The request is about extending JustMock with some helpers that can be used to solve this issue easily.

Completed
Last Updated: 08 Dec 2022 10:14 by ADMIN
Created by: Mihail
Comments: 1
Type: Feature Request
0
Some years ago, we committed ourselves to introduce support in Telerik JustMock for all new technology trends as soon as we can. We will introduce support for the official .NET 7 version following this commitment.
Unplanned
Last Updated: 18 Jan 2022 09:35 by ADMIN
A documentation article should be added that explains how to integrate JustMock to work within JetBrains Rider
Completed
Last Updated: 08 Jun 2023 11:59 by ADMIN
Created by: Tomer
Comments: 12
Type: Feature Request
2

We're developing .net 5/core services, using Rider IDE and MacOS.

Please:

1. Add support to run JustMock under MacOS (profiler need to be supported, enabled issue, etc.), or if already supported, please provide instructions of how to activate it per test, for example using NUnit.

2. Add integration with Rider so all the process will be much easier.

 

Completed
Last Updated: 12 May 2022 07:54 by ADMIN
Currently argument matchers like Arg.IsAny and Arg.Matches (and the corresponding ones used in NonPublic API Arg.Expr) accept types only as generic arguments, which makes the type specification at runtime impossible.
Unplanned
Last Updated: 16 Nov 2021 10:04 by ADMIN
Adding JustMock to the Extensions section under Assemblies in the Add Reference dialog will make it easier for the developers to find where the required dll is located.
Completed
Last Updated: 30 Nov 2023 09:05 by ADMIN
Code Coverage Wrapper data collector strictly follows the installation directory structure and it makes installation-free usage really hard (with JustMock.Commercial NuGet package for example). Adding some configuration settings will solve this issue.
Unplanned
Last Updated: 01 Dec 2021 14:06 by ADMIN
Created by: Ivo
Comments: 0
Type: Feature Request
1
Coverlet (https://github.com/coverlet-coverage/coverlet) is a cross-platform .NET code coverage tool, so the integration should be considered for all currently (and also potentially) supported platforms by JustMock.
Declined
Last Updated: 28 Jun 2023 13:24 by ADMIN
Created by: Mihail
Comments: 0
Type: Feature Request
0

Allow the developer to create custom behaviors and use them in an arrangement. Something like the following:

            Mock.Arrange(() => foo.CalcData(Arg.AnyInt, Arg.AnyInt), new IBehavior[]
            {
                new LogInvocation(),
                new ReturnBaseOrDefaultValue(),
            });

Unplanned
Last Updated: 19 Aug 2021 07:54 by ADMIN

The new public API should allow the developer to access the invocations for a particular arrangement. Something like the following:

IEnumerable<IInvocaiton> invocations = foo.GetInvocationsFor((x) => x.CalcData(2, 2));

Unplanned
Last Updated: 19 Aug 2021 07:50 by ADMIN

Implement a new public API that will allow the developer to iterate over all invocations of mock arrangements. Something like the following:

IEnumerable<IInvocaiton> invocations = Mock.Invocations;

1 2 3 4 5