Robert Welters

JustMock should support .NET Core

Feature Request by Robert Welters Status: Approved Comments: 0 Last update: 2018-02-19T15:21:40 by Mihail Vladov
0
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
0
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
0
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
0
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
0
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: https://msdn.microsoft.com/en-us/library/jj155796.aspx
Problem by Kamen Ivanov Status: Rejected Comments: 0 Last update: 2017-11-29T12:53:55 by Mihail Vladov
0
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
0
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
0
G M

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: Approved Comments: 0 Last update: 2017-10-12T12:28:33 by Mihail Vladov
0
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;

reg

.UsingThis(new object())

.UsingThat<int>();

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
0
Displaying items 1 - 10 of 59