Unplanned
Last Updated: 26 Feb 2024 23:58 by David
Ivo
Created on: 17 Oct 2022 12:22
Type: Bug Report
4
Using declaration causes InvalidProgramException

if you use the C# using declaration and have JustMock advanced (elevated) mode enabled, the runtime will throw an InvalidProgramException.

Find below the sample code that demonstrates the issue:

public class TestClass : IDisposable
{
    public void Dispose()
    {
    }
}

[TestClass]
public class Fixture
{
    public interface ITest { }

    [TestMethod]
    public async Task Test()
    {
        ITest mock = Mock.Create<ITest>();
        using TestClass test = new();
    }
}

3 comments
David
Posted on: 26 Feb 2024 23:58
Yes no worries on the patience :)  Need that when programming ehh?  Really good that it is a top priority too.  Thanks for your update on the planned fixes.
ADMIN
Ivo
Posted on: 22 Feb 2024 08:27

Hello David,

It is one of our top priorities for the next release (scheduled for mid-May, but we will do our best to deliver it earlier), so I would like to ask you for a bit of patience.

Regards,
Ivo
Progress Telerik

A brand new JustMock course was just added to the Virtual Classroom - the free self-paced technical training portal that gets you up to speed with Telerik and Kendo UI products! Check it out at https://learn.telerik.com.
David
Posted on: 22 Feb 2024 00:06

Can we please get this fixed?  Our whole team has to turn OFF the "Automatic Mock Repository Cleanup Enabled" flag EVERY time we restart Visual Studio 2022.  If we don't we run into this error. 

ALSO the "Automatic Mock Repository Cleanup Enabled" flag doesn't stay set to false - keeps reverting back to TRUE.