Completed
Last Updated: 25 Sep 2019 08:46 by ADMIN

The CallMethod of the PrivateAccessor is using reflection to invoke the required method. When an exception is thrown inside that method it will be wrapped by the reflection in a TargetInvocationException which is received in the test method.

Instead of the TargetInvocationException, throw the original exception.

Completed
Last Updated: 24 Sep 2019 10:08 by ADMIN
Elevated unit testing does not work with NET Core SDK 3.0.100 - preview8
Completed
Last Updated: 24 Sep 2019 10:05 by ADMIN
Implement support for future mocking of public class with non-public arguments.
Such example is the future mocking of the class Timer with a private callback.
Completed
Last Updated: 24 Sep 2019 10:04 by ADMIN
Created by: Mihail
Comments: 1
Type: Feature Request
0
Implement support for future mocking of non-public classes.
Completed
Last Updated: 24 Sep 2019 10:03 by ADMIN
Created by: Lyubomir
Comments: 1
Type: Feature Request
2
Currently JustMock does not support mocking non-public generic methods. There are couple of possible workarounds but the need for proper implementation for mocking the language feature is still required.
Approved
Last Updated: 12 Sep 2019 12:51 by ADMIN

Implement integration between JustMock and the code coverage provided by Visual Studio for .net core applications.

Steps representing the missing feature:

Create a .net core test project.

Include JustMock tests.

Execute the tests with code coverage provided by Visual Studio Enterprise.

The tests fail with a message pointing the integration between JustMock and the code coverage tool.
Approved
Last Updated: 12 Sep 2019 12:46 by ADMIN
Just like the core mocking API has ArrangeSet/AssertSet methods, so should the MockingContainer have them.
Approved
Last Updated: 22 Aug 2019 06:21 by ADMIN
Created by: Mihail
Comments: 0
Type: Feature Request
2
Implement support for executing JustMock tests on Linux
Approved
Last Updated: 19 Aug 2019 15:28 by ADMIN
The JutMock task for Azure Pipeline is missing the option to execute the tests with Visual Studio 2019. Check the attached screenshot.
Approved
Last Updated: 09 Jul 2019 11:14 by ADMIN
The JustMock profiler should be added to the commercial NuGet package distributed from the Telerik private NuGet server.
Approved
Last Updated: 05 Jun 2019 11:59 by ADMIN

Hi I have encountered what I think is a bug.

I would expected the following unit test to pass. It does not.

The example is distilled from a more complex case.

Is it not supported to have other threads create mocks?

[Fact] public async Task Fails() { var iTask = Task.Run(() => Mock.Create<I>()); var i = await iTask; EA expectedArgs = new EA(); EA receivedArgs = null; i.Done += (sender, ea) => receivedArgs = ea;

i.Raise(x => x.Done += null, expectedArgs); Assert.Equal(expectedArgs, receivedArgs); } public class EA : EventArgs { } public interface I { event EventHandler<EA> Done; }


Approved
Last Updated: 30 May 2019 08:38 by ADMIN

Let's have the following class and unit test:

public delegate Task<int> SomeDelegate();

public class Class1
{
    public async Task<int> ExecuteAsync(SomeDelegate next)
    {
        Task<int> task1 = next.Invoke();
        int int1 = await DoSomeStuff();
        int int2 = await task1;
        return int1 + int2;
    }

    private async Task<int> DoSomeStuff()
    {
        await Task.Delay(100);
        return 1;
    }
}

[TestMethod]
public async Task TestMethod1()
{
    // Arrange
    SomeDelegate next = Mock.Create<SomeDelegate>();
    next.Arrange(n => n.Invoke()).TaskResult(2).OccursOnce();
    // Act
    int sum = await new Class1().ExecuteAsync(next);

    // Assert
    Mock.Assert(next);
    Assert.AreEqual(3, sum);
}

JustMock public API lacks of convenient way to assert that particular task has been awaited. Potential workaround involves some "insider knowledge" that awaiting a Task internally results in a calls to some of its members.

Completed
Last Updated: 20 May 2019 09:44 by ADMIN
2019.R1 JustMock Test project templates need to be updated to support .Net Core, currently they are targeting just .Net Framework (see attached screen shot).
In Development
Last Updated: 03 Apr 2019 07:43 by ADMIN
Docker is a container acting like an isolated environment. Research how the JustMock profiler can be registered into such container.
Hosted VSTS should work on the same principle. Research how the registry could be accessed through VSTS extension or other tools.
Approved
Last Updated: 01 Apr 2019 11:21 by ADMIN
Implement support for code coverage in the JustMock VSTest v.2 Azure Pipeline task similar to the code coverage option available in VS Test task.
Completed
Last Updated: 16 Jan 2019 11:55 by ADMIN
The main point behind this request is to add new command line option to JustMockRunner in order to enable profiler without need for being registered, more details about this feature can be found on MSDN at https://msdn.microsoft.com/en-us/library/ee471451(v=vs.100).aspx
Completed
Last Updated: 16 Jan 2019 08:39 by ADMIN
Created by: Robert
Comments: 7
Type: Feature Request
13

			
Declined
Last Updated: 12 Oct 2018 10:25 by ADMIN
Created by: Nick
Comments: 1
Type: Feature Request
0
If I define a fluent API, I might have an interface such as this:

public interface IRegistrar { 

IRegistrar UsingThis(object someThing);

IRegistrar UsingThat<TThatThing>() }

If I create a mock of this using the default Behaviour.RecursiveLoose and make no arrangements, calls to the methods will return new mocks of the type, rather than the same instance that was called. 

It would be nice to have a behaviour type that can return the same instance (in this case the mocked instance) without having to define a stub for each method call.

My code under test might look like:

IRegistrar reg;

reg

  .UsingThis(new object())

  .UsingThat<int>();

Currently, a test on the second call will fail if written against the mock assigned to 'reg'.
Approved
Last Updated: 12 Oct 2018 08:32 by Troy
Created by: Troy
Comments: 0
Type: Feature Request
3
Allow future mocking of an entire class, including a default of DoNothing() for all methods in the class, rather than requiring each method to be future mocked separately.
1 2 3