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: 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.
In Development
Last Updated: 25 Feb 2019 08:55 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: 14 Feb 2019 08:30 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; }


Completed
Last Updated: 07 Feb 2019 16:37 by ADMIN

Types that implement ISerializable can't be mocked anymore with the 2019.1.115.2 version resulting in System.ArgumentException. The issue is a regression compared to older versions of JustMock.

Example of such type is System.Reflection.Assembly. 

Completed
Last Updated: 07 Feb 2019 16:33 by ADMIN
A simple WinForms application crashes on start when JustMock(2019.1.115.2) profiler is enabled.

Steps to reproduce:
1. Create a new WinForms Application.
2. Start the application. In Debug it is most visible. 
3. After the application is started move the mouse in the middle of the application. The exact location is not important.
4. A FieldAccessExceptionis is thrown.

System.FieldAccessException: Attempt by method 'System.Windows.Forms.SafeNativeMethods._TrackMouseEvent(TRACKMOUSEEVENT)' to access field 'System.AccessibilityImprovements.useLegacyAccessibilityFeatures' failed.
   at System.Windows.Forms.SafeNativeMethods._TrackMouseEvent(TRACKMOUSEEVENT tme)
   at System.Windows.Forms.SafeNativeMethods.TrackMouseEvent(TRACKMOUSEEVENT tme)
   at System.Windows.Forms.Control.HookMouseEvent()
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Temporary workaround: disable the JustMock Profiler from the JustMock menu while developing the application and enable it while running the tests.
A fix can be expected with the next official release. You can follow this item in order to receive status updates.
Approved
Last Updated: 29 Jan 2019 14:10 by ADMIN
Created by: Marcel
Comments: 0
Type: Bug Report
0
Basically calling Mock.Reset at the end of the method is not safe.
It seems like the the way JustMock iterates over an IEnumerable is not correct.
Log:
2019-01-25T09:23:53.9254819Z Warning: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
2019-01-25T09:23:53.9254819Z    at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
2019-01-25T09:23:53.9254819Z    at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
2019-01-25T09:23:53.9254819Z    at Telerik.JustMock.Core.MocksRepository.CopyConfigurationFromParent()
2019-01-25T09:23:53.9254819Z    at Telerik.JustMock.Core.MocksRepository.Reset()
2019-01-25T09:23:53.9254819Z    at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.RepositoryOperationsStrongRef.RetireRepository(Object key, MocksRepository repo)
2019-01-25T09:23:53.9254819Z    at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.FindRepositoryInOps(RepositoryOperationsBase entryOps, Object entryKey)
2019-01-25T09:23:53.9254819Z    at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.RetireRepository()
2019-01-25T09:23:53.9254819Z    at Telerik.JustMock.Core.Context.MockingContext.RetireRepository()
2019-01-25T09:23:53.9254819Z    at Telerik.JustMock.Core.ProfilerInterceptor.GuardInternal(Action guardedAction)
2019-01-25T09:23:53.9254819Z    at Sap.Tests.<MyTests_DoAsync_ReturnTrue>d__26.MoveNext() in E:\Builds\_work\9\s\Tests\MyTests.cs:line 476
2019-01-25T09:23:53.9254819Z    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
2019-01-25T09:23:53.9254819Z    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
2019-01-25T09:23:53.9410972Z    at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
2019-01-25T09:23:53.9410972Z    at System.Threading.ThreadPoolWorkQueue.Dispatch()
2019-01-25T09:23:53.9410972Z    at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
2019-01-25T09:23:53.9410972Z    at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
2019-01-25T09:23:53.9410972Z    at Telerik.JustMock.Core.MocksRepository.CopyConfigurationFromParent()
2019-01-25T09:23:53.9410972Z    at Telerik.JustMock.Core.MocksRepository.Reset()
2019-01-25T09:23:53.9410972Z    at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.RepositoryOperationsStrongRef.RetireRepository(Object key, MocksRepository repo)
2019-01-25T09:23:53.9410972Z    at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.FindRepositoryInOps(RepositoryOperationsBase entryOps, Object entryKey)
2019-01-25T09:23:53.9410972Z    at Telerik.JustMock.Core.Context.HierarchicalTestFrameworkContextResolver.RetireRepository()
2019-01-25T09:23:53.9410972Z    at Telerik.JustMock.Core.Context.MockingContext.RetireRepository()
2019-01-25T09:23:53.9410972Z    at Telerik.JustMock.Core.ProfilerInterceptor.GuardInternal(Action guardedAction)
2019-01-25T09:23:53.9410972Z    at Sap.Tests.<MyTests_DoAsync_ReturnTrue>d__26.MoveNext() in E:\Builds\_work\9\s\Tests\MyTests.cs:line 476
2019-01-25T09:23:53.9410972Z    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
2019-01-25T09:23:53.9410972Z    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
2019-01-25T09:23:53.9410972Z    at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()
2019-01-25T09:23:53.9410972Z    at System.Threading.ThreadPoolWorkQueue.Dispatch()
Approved
Last Updated: 17 Jan 2019 15:08 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).
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:59 by ADMIN
If there are more that one mock objects existing in the test, Mock.Assert wrongly succeeds while evaluating arrangements for each mock, but not the very first one. This is a regression compared to an older version from 2012. The following sample demonstrates the case:
public interface IFoo
{
    void Bar();
}

[TestClass]
public class UnitTest1
{
    [TestMethod]
    public void TestMethod1()
    {
        var bar = Mock.Create<IFoo>();
        Mock.Arrange(() => bar.Bar()).OccursOnce();

        var foo = Mock.Create<IFoo>();
        Mock.Arrange(() => foo.Bar()).OccursOnce();

        Mock.Assert(foo); // Would wrongly succeed
        Mock.Assert(bar); // Would fail as expected
    }
}
Completed
Last Updated: 16 Jan 2019 08:51 by ADMIN
Created by: Michael
Comments: 4
Type: Bug Report
7
Creating a share link with Visual Studio Live Share does not work if you have the JustMock profiler enabled. We specifically have to disable the JustMock profiler in order for VS Live Share to create sharing links. This has been reproduced by several different members of our team.

Could this please be looked into? Thanks!
Completed
Last Updated: 16 Jan 2019 08:39 by ADMIN
Created by: Robert
Comments: 7
Type: Feature Request
13

			
Rejected
Last Updated: 12 Oct 2018 10:29 by ADMIN
When using Mock.CreateLike<> we've found that trying to directly mock anything lower than two layers down on a concrete class (e.g. x => x.Layer1.Layer2.Property == "test") throws a NullReferenceException unless the profiler is enabled. It wasn't clear in the exception or the documentation relating to this method that the real issue was the profiler being disabled, and only by trial and error did we find the solution.
Rejected
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'.
Rejected
Last Updated: 12 Oct 2018 08:45 by ADMIN
this nuts, forcing me to answer a dialog for JustMock and JustTrace to turn off sending usage to Telerik.  Very poor UX.  Stop doing this.
Rejected
Last Updated: 12 Oct 2018 08:43 by ADMIN
Created by: Brian
Comments: 2
Type: Bug Report
0
Resharper 10 code coverage have tests failing when arrange to have JustMock to return values from methods called under test. Perhaps one tool too many manipulating .NET objects behind-the-scenes at a time?
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: 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: 13 Sep 2018 06:41 by ADMIN
A class property get wrongly mocked when used as parameter for arranging other class methods. The following sample demonstrates the scenario:

class Foo
{
	public string Prop{ get; set; }

	public void Bar(string val)
	{
	}
}

[TestMethod]
public void Sample()
{
	var sut = Mock.Create<Foo>(Behavior.CallOriginal);

	Mock.Arrange(() => sut.Bar(sut.Prop)).DoNothing();
}
1 2 3 4