Robert Welters

JustMock should support .NET Core

Feature Request by Robert Welters Status: Approved Comments: 3 Last update: 2018-06-05T15:43:53 by Mihail Vladov

Visual Studio Team Services integration

Our team is moving to VSTS and not having an official solution to run JustMock tests through their build system is a deal-breaker.
Feature Request by G M Status: Completed Comments: 1 Last update: 2018-03-01T15:48:22 by Mihail Vladov
Mihail Vladov

Static method with dynamic argument cannot be mocked if the class is in a different assembly than the unit test

Problem by Mihail Vladov Status: Approved Comments: 1 Attachments: 1 Last update: 2018-02-07T19:59:15 by corporación de alta tecnologia para la defensa
Kamen Ivanov
Team Member

Add integration with CodeRush

Feature Request by Kamen Ivanov Status: Approved Comments: 1 Last update: 2018-01-04T09:36:41 by Mihail Vladov
Mihail Vladov

Mocking DateTime.UtcNow fails in async test cases

On slow machines, sometimes arrangements lose their context and the expected mocked return value for DateTime.UtcNow fails.
Problem by Mihail Vladov Status: In Development Comments: 0 Last update: 2017-12-11T09:54:15 by Mihail Vladov
Mihail Vladov

Implement integration support for AxoCover

Feature Request by Mihail Vladov Status: Approved Comments: 0 Last update: 2017-11-29T14:20:58 by Mihail Vladov
Kamen Ivanov
Team Member

Tests fail when run via vstest.console but pass when run from VS2015

Tests fail when run with vstest.console.exe but pass when run from VS2015.

Findings: The problematic scenario includes reference to Microsoft.WindowsAzure.ServiceRuntime.dll and usage of the RoleEnvironment class. When the RoleEnvironment class is used in a test project without JustMock and runned from vstest.console the exception will be thrown as well. Here is the exact exception:
System.TypeInitializationException: The type initializer for 'Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment' threw an exception. ---> System.TypeInitializationException: The type initializer for '<Module>' threw an exception. ---> <CrtImplementationDetails>.ModuleLoadException: The C++ module failed to load while attempting to initialize the default appdomain.
---> System.Runtime.InteropServices.COMException: Invalid operation. (Exception from HRESULT: 0x80131022)
Stack Trace:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at <CrtImplementationDetails>.GetDefaultDomain()
at <CrtImplementationDetails>.DoCallBackInDefaultDomain(IntPtr function, Void* cookie)
at <CrtImplementationDetails>.LanguageSupport.InitializeDefaultAppDomain(LanguageSupport* )
at <CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* )
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
--- End of inner exception stack trace ---
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
at .cctor()
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeEnvironment()
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment..cctor()
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.get_IsAvailable()

Workaround: the vstest.console.exe could be started with parameter /InIsolation, which runs the tests in an isolated process. Here is the link to the command line options:
Problem by Kamen Ivanov Status: Rejected Comments: 0 Last update: 2017-11-29T12:53:55 by Mihail Vladov
Kaloyan Kotorov

Different behaviour for different Arrange() overrides

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.
Problem by Kaloyan Kotorov Status: New Comments: 0 Attachments: 1 Last update: 2017-11-10T10:25:17 by Kaloyan Kotorov
Stacey Michaud

JustMock Profiler causes application hang on "new ReportDocument()"

I am using Visual Studio 2015, Crystal Reports 12.0.2. When running from Visual Studio in debug mode or not, the application hangs on the statement "new ReportDocument()". ReportDocument is a class defined in CrystalReports.

When I disabled the JustMock Profiler, this statement no longer hung.

Just FYI. Hopefully others will see this.
Feedback by Stacey Michaud Status: New Comments: 0 Last update: 2017-10-18T14:56:32 by Stacey Michaud
Nick Apps

Allow simple mocking of fluent interfaces

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;


.UsingThis(new object())


Currently, a test on the second call will fail if written against the mock assigned to 'reg'.
Feature Request by Nick Apps Status: New Comments: 0 Last update: 2017-10-02T10:01:24 by Nick Apps
Displaying items 1 - 10 of 59