Completed
Last Updated: 18 Jun 2019 10:06 by ADMIN

Values from already mocked methods are not taken into account when initializing a static constructor from the Telerik.JustMock.PrivateAccessor class.

Here is an example: PrivateAccessor.ForType(typeof(Foo)).SetField("someStringField", "stringvalue");

A workaround is to call the: Mock.Intercept(typeof(Foo)); before calling the PrivateAccessor.

Completed
Last Updated: 18 Jun 2019 08:37 by ADMIN
The integration between JustMock and dotCover stopped working with R2 2019. The result when code coverage is started is that all tests remain in pending state and does not finish while the CPU is idle.
Completed
Last Updated: 18 Jun 2019 08:34 by ADMIN
I have a .Net Core solution and want to see the code coverage in VS 2019. However, when I run the tests with code coverage, I get the error message, that the profiler is not enabled, although it is enabled. The test is green without code coverage (and with enabled profiler). It is also green and the coverage is displayed with JustMock commented out and the profiler disabled.
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.
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: 20 May 2019 09:31 by ADMIN
Created by: Marcel
Comments: 1
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()
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).
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: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: 20 May 2019 09:26 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();
}
Completed
Last Updated: 20 May 2019 09:32 by ADMIN
Mocking an async calls alse triggers hidden mocking of the return type. Depending of the type it might cause unexpected behavior or exception.
Completed
Last Updated: 12 Sep 2018 14:04 by ADMIN
MbUnitContextResolver gets wrongly initialized because of the weak check based on Gallio.Framework.Assertions.AssertionException type presence in the current app domain. Needs to be improved with some additional type check from mbunit assembly, MbUnit.Framework.TestFixtureAttribute for example.
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

			
Completed
Last Updated: 18 Jun 2019 08:43 by ADMIN
There is a different behaviour when mocking the same method using the following two Arrange overrides:

public static FuncExpectation<TResult> Arrange<TResult>(Expression<Func<TResult>> expression);
public static FuncExpectation<TResult> Arrange<T, TResult>(T obj, Func<T, TResult> func);

Repro project attached. Steps to reproduce:
1. Open attached solution
2. In Tests.cs, run JustMockArrangeQueryableTest - it passes
3. Run JustMockArrangeQueryableTest2 - it fails with a invalid cast exception on the Residents collection.
Completed
Last Updated: 01 Mar 2018 15:48 by ADMIN
Created by: Greg
Comments: 1
Type: Feature Request
1
Our team is moving to VSTS and not having an official solution to run JustMock tests through their build system is a deal-breaker.
Completed
Last Updated: 12 Sep 2018 14:04 by ADMIN
ADMIN
Created by: Kamen Ivanov
Comments: 1
Type: Feature Request
3
It would be good if we could use named parameters inside Mock.Arrange method.
Completed
Last Updated: 22 Jun 2018 07:48 by Jeremy
Created by: Michele
Comments: 3
Type: Bug Report
0
In Visual Studio 2015 Pro justmock generates this error error MSB6006: "vbc.exe" To function properly you need to uninstall VS2015 justmock.

Bye
Completed
Last Updated: 14 Oct 2015 08:48 by Stefan
eg

// Act
testSUT.Execute(1);

// Assert
myMockThing.Assert(x => x.Foo, Occurs.Once(), "calling Execute() with 1 should execute Foo due to blah");
1 2 3