Unplanned
Last Updated: 08 Oct 2020 10:07 by ADMIN
Created by: Mihail
Comments: 2
Type: Bug Report
2

When a breakpoint is added inside an async test that uses JustMock the debugger is failing to hit it. 

To reproduce the issue follow the next steps:

1. Open the attached project

2. Create a breakpoint at the first arrangement in the async test method.

3. Start debugging the async test

Result: the breakpoint is not hit.

The issue is observed for both .NET Core and .NET Framework.

Unplanned
Last Updated: 18 Sep 2020 14:24 by ADMIN
Created by: Ivo
Comments: 0
Type: Feature Request
0

C# 8 introduces default interface method implementations. Attempt to mock such methods with JustMock in elevated mode fails. The following example illustrates the issue:

public interface IMyInterface
{
    int IntProperty { get => 0; }
}


[TestClass]
public class UnitTest1
{
    [TestMethod]
    public void TestMethod1()
    {
        var mock = Mock.Create<IMyInterface>();
        Mock.Arrange(() => mock.IntProperty).Returns(1);

        Assert.AreEqual(1, mock.IntProperty);
    }
}

 

 

 
Unplanned
Last Updated: 18 Sep 2020 08:00 by ADMIN
Created by: Dan Avni
Comments: 1
Type: Feature Request
0
After creating a future mock for some method in an object in which I also specify the mock must be called, there is no way to assert that the mock was actually called. Using Mock.Assert on the test method always passes even when the mocked method was not called.
Unplanned
Last Updated: 10 Sep 2020 15:10 by ADMIN

Attempt to use JustMock VSTest v.2 task to run the elevated mode tests with coverage when the "Test platform version" option is set to value "Installed by Tools Installer" fails with error:

Telerik.JustMock.Core.ElevatedMockingException: Cannot mock '<target type goes here>'. The profiler must be enabled to mock, arrange or execute the specified target.
Detected active third-party profilers:
* {9317ae81-bcd8-47b7-aaa1-a28062e41c71} (from process environment)
Disable the profilers or link them from the JustMock configuration utility. Restart the test runner and, if necessary, Visual Studio after linking.

Unplanned
Last Updated: 10 Sep 2020 07:19 by Benjamin

Currently, when the JustMock profiler is enabled it provides a performance hit on the test execution. This effect is expected because a profiler is involved.

What we can do is find a more optimized way of instrumenting the methods.

Unplanned
Last Updated: 13 Aug 2020 14:29 by ADMIN
When the ports with which the DebugWindow should operate are changed in the DebugWindow host configuration the process is started with the default values instead of the new values.
Unplanned
Last Updated: 06 Aug 2020 14:20 by ADMIN

The test run is aborted when a .testsettings is used for executing JustMock tests. The .testsettings contains only a description.

<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name="Local" id="15694c75-be1c-4113-9d42-2cbe1013c41c" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
  <Description>These are default test settings for a local test run.</Description>
</TestSettings>

It seems that the usage of the MSTest element is breaking the execution. As .testsettings are deprecated use .runsettings instead without MSTest element.

Unplanned
Last Updated: 20 Jul 2020 09:41 by ADMIN

Having the following COM interop class

[ClassInterface(ClassInterfaceType.None)]
[Guid("86332C4E-0BDE-46EC-94C5-0A946C33C682")]
[TypeLibType(TypeLibTypeFlags.FCanCreate)]
public class MyComObjectClass : IMyComObject, MyComObject
{
    public MyComObjectClass();

    [DispId(1)]
    public virtual string Echo(string message);
}

and the sample class that uses it:

public class MyComObjectClassProxy
{
    public string Echo(string message)
    {
        IMyComObject itf = null;
        try
        {
            itf = new MyComObjectClass();
            return itf.Echo(message);
        }
        finally
        {
            if (itf != null)
            {
                Marshal.ReleaseComObject(itf);
            }
        }
    }
}

When I try to call the arranged constructor I am getting an error "Cannot create instances of type requiring managed activation", the unit test code:

[TestMethod]
public void TestMethod1()
{
    var mock = Mock.Create<MyComObjectClass>();
    Mock.Arrange(() => new MyComObjectClass()).Returns(mock);

    var sut = new MyComObjectClassProxy();
    var actual = sut.Echo("Message");

    Assert.AreEqual(string.Empty, actual);
}
Unplanned
Last Updated: 25 Jun 2020 14:08 by ADMIN
Currently, the JustMock tests are failing when the Live Unit testing functionality is started. JustMock should provide integration for the Visual Studio Live Unit testing functionality.
Unplanned
Last Updated: 24 Jun 2020 09:22 by ADMIN
The exception description does not clearly state that there is an issue with the member which is a target of the mocking which could easily lead to confusion. Attached sample project reproducing the issue.
Unplanned
Last Updated: 17 Jun 2020 08:34 by ADMIN
JustMock configuration tool requires admin users for toggling integration with 3-rd party profilers which might become a blocker for using it in the CI pipelines.
Unplanned
Last Updated: 12 Jun 2020 07:22 by ADMIN
Created by: Mihail
Comments: 0
Type: Feature Request
0
Implement support for VS Code.
Unplanned
Last Updated: 22 Apr 2020 15:26 by ADMIN
The Add/Update JustMock reference is shown for .NET Core projects but without implementation it does nothing.
Unplanned
Last Updated: 07 Apr 2020 12:07 by ADMIN
In some cases, the working directory of the test execution needs to be changed to a dedicated path. Currently, it is not possible out of the box, as a workaround can be used start command.
Unplanned
Last Updated: 21 Feb 2020 11:53 by ADMIN
Created by: Toshio
Comments: 0
Type: Bug Report
0
An attempt to use future mocking fails. The attached sample demonstrates the issue.
Unplanned
Last Updated: 26 Nov 2019 10:08 by ADMIN
.Net for application developers prefer writing their build script using cake. It is necessary for JustMock to have a cake utility to work with. 
Unplanned
Last Updated: 28 Oct 2019 15:00 by ADMIN
Created by: Mihail
Comments: 0
Type: Feature Request
0
Consider the scenario where a class has a string field which is his main data. This class has defined an implicit cast operator to string. When that cast operator is executed the resulted string will contain the value from the class field.

Implement support for mocking of an operator such as the one described. 
Unplanned
Last Updated: 22 Aug 2019 06:21 by ADMIN
Created by: Mihail
Comments: 0
Type: Feature Request
6
Implement support for executing JustMock tests on Linux
Unplanned
Last Updated: 18 Jun 2019 14:21 by ADMIN
The scenario includes two async tests executed synchronously. The first test doesn't have an await task call and in some random runs fails to call Mock.Reset. This messes the mocked objects of the second async test.
Unplanned
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; }


1 2