Approved
Last Updated: 23 Jul 2018 12:55 by Brian
Created by: Brian
Comments: 0
Type: Feature Request
18
Any plans to support Windows 10 UWP/UAP projects? I tried the existing version but ran into several roadblocks:

Attempt #1 (does not work):
Cannot add JustMockLite to a Windows 10 Unit Test project via NuGet because UAP projects are not supported.

Attempt #2 (does not work)
Add a reference to the pre-compiled binaries. The Win10 project allows the reference, but when the tests run, it results in a bunch of 'Could not find assembly System.Core v3.5.0.0' exceptions. Tried installing .Net 3.5 but didnt help. Tried building from source and retargeting the framework to 4, 4.5, 4.5.2, and 4.6, but that didnt work (see Attempt #3).
Just a note: when Visual Studio 2015 was in RC status, we had this working. We simply added a reference to the pre-compiled Telerik.JustMocks assembly and things worked. Updating to VS RTM though broke things.

Attempt #3 (does not work)
Compile JustMockLite from source.  VS complains that the Win10 Unit Test project is of type NetCore and the JustMock assembly targets NetFramework.

Attempt #4 (does not work)
Add reference to Telerik.JustMock.Portable to Windows 10 Unit Test project. This allows the project to compile and run, but any tests using Mock.Create() fail because System.Diagnostics.StackTrace.ctor is not supported.

Approved
Last Updated: 29 Nov 2017 14:20 by ADMIN
ADMIN
Created by: Mihail
Comments: 0
Type: Feature Request
5
AxoCover is test runner and a code coverage tool.

https://marketplace.visualstudio.com/items?itemName=axodox1.AxoCover

https://github.com/axodox/AxoCover
Approved
Last Updated: 04 Jan 2018 09:36 by Josh
ADMIN
Created by: Kamen Ivanov
Comments: 1
Type: Feature Request
4

			
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.
Approved
Last Updated: 23 Jul 2018 13:16 by Stefan
I'm a user that is refactoring a legacy system which has a certain component to which I do not have the source. It uses COM interop heavily. I would like to be able to future-mock instances of RCW's so that I can write tests for that component.
Approved
Last Updated: 23 Jul 2018 12:48 by Stefan
My team and I have spotted some odd behaviour with the latest version of JustMock (2015.3.929.5) when targeting a Windows Store app.

If we create a mock for an object in a helper method, the mock fails when making assertions for calls to the mock.

The following code illustrates the issue:

        [TestMethod]
        public void ThisWillFail()
        {
            var subject = CreateSubject();

            subject.DoSomething();

            subject.Assert(s => s.DoSomething(), Occurs.Once());
        }

        [TestMethod]
        public void ThisWillPass()
        {
            var subject = Mock.Create<ISubject>();

            subject.DoSomething();

            subject.Assert(s => s.DoSomething(), Occurs.Once());
        }

        public interface ISubject
        {
            void DoSomething();
        }

        private static ISubject CreateSubject()
        {
            return Mock.Create<ISubject>();
        }

In this code, the first test will fail but the second test will pass. The only difference is that, in the first test, we're setting up the mock in a helper method.

We have a "Unit Test Library (.NET for Windows Store apps)" referencing the Telerik.JustMock assembly. I have attached a simple project containing this implementation.

It's worth noting that the same code passes in a regular .NET class library; it only fails in a "Unit Test Library (.NET for Windows Store apps)". It's also worth noting that this worked under an older version of the assembly (2014.3.1021.2).

Any help would be appreciated, as we currently have around 3,000 tests and a good proportion of them set up their mocks using a helper method in this way.

Regards
William Cowell
Approved
Last Updated: 23 Jul 2018 13:04 by ADMIN
ADMIN
Created by: Vladi
Comments: 0
Type: Feature Request
2
Integrate with Simple Injector: https://simpleinjector.org/index.html similar to https://www.nuget.org/packages/JustMock.Unity and https://www.nuget.org/packages/JustMock.Mef/
Approved
Last Updated: 01 Apr 2019 14:13 by ADMIN
Created by: Lyubomir
Comments: 0
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: 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: 23 Jul 2018 13:39 by Stefan
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: 29 Mar 2019 14:25 by ADMIN
The JustMock tests are failing when the "Test platform version" option in the JustMock VSTest v.2 task is set to value "Installed by Tools Installer".
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.
Approved
Last Updated: 25 Feb 2019 14:50 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.
Approved
Last Updated: 25 Feb 2019 16:35 by ADMIN
Created by: Mihail
Comments: 0
Type: Feature Request
0
Implement support for future mocking of non-public classes.
Approved
Last Updated: 06 Aug 2018 07:41 by ADMIN
Asynchronous test execution might be run in a separate thread (it depends of the environment and it is completely transparent) which causes arrangements to lose their context. That is why the expected mocked return value for DateTime.UtcNow calls the original code and finally the test fails.
Approved
Last Updated: 08 Oct 2018 10:50 by ADMIN
Currently, there is no out of  the box support for passing "out" and "ref" parameters for nonpublic API.
Approved
Last Updated: 23 Jul 2018 13:31 by Kaloyan
Current behavior:
Mock.Arrange(xxx).IgnoreInstance();    //mock all future instances of the type on which I set an expectation.


Feature Request:
Mock.Arrange(xxx).IgnoreInstance().Next();    //mock the next instance of the type on which I set an expectation.

...and even better...

Mock.Arrange(xxx).IgnoreInstance().Skip(3).Next();   //mock the 4th instance of a type on which I set an expectation.
Approved
Last Updated: 23 Jul 2018 13:10 by Stefan
Created by: Stefan
Comments: 0
Type: Feature Request
0
I'd like to be able to intercept and arrange access to fields on any class.

public class Dependency
{
  public int A;
}
..
var dep = new Dependency();
Mock.Arrange(() => dep.A).Returns(5);
Mock.ArrangeSet(() => dep.A = Arg.AnyInt).DoInstead(...);
Approved
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.
1 2