Michele Sinesi

justmock

In Visual Studio 2015 Pro justmock generates this error error MSB6006: "vbc.exe" To function properly you need to uninstall VS2015 justmock.

Bye
Problem by Michele Sinesi Status: New Comments: 3 Last update: 2016-08-02T22:08:40 by Jeremy Simmons
0
Brian Stanton

resharper 10

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?
Problem by Brian Stanton Status: New Comments: 1 Last update: 2015-12-18T15:35:53 by Brian Stanton
0
William Cowell

Mocking WinRT using helper methods to create mocks

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
Problem by William Cowell Status: New Comments: 2 Attachments: 1 Last update: 2015-12-01T11:51:09 by Stefan Dragnev
0
Stefan Dragnev

Support interop-related method signatures - pointers, TypedReference and __arglist

Feedback by Stefan Dragnev Status: Unscheduled Comments: 1 Last update: 2015-10-14T08:22:17 by Stefan Dragnev
0
Brian Dunnington

Support Windows 10 UWP/UAP unit test projects

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.

Feature Request by Brian Dunnington Status: New Comments: 0 Last update: 2015-08-07T19:01:50 by Brian Dunnington
0
Vladimir Dragoev

Integrate with Simple Injector

Feature Request by Vladimir Dragoev Status: New Comments: 0 Last update: 2014-10-30T13:30:48 by Vladimir Dragoev
0
Stefan Dragnev

Field access mocking

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(...);
Feature Request by Stefan Dragnev Status: New Comments: 0 Last update: 2014-10-13T07:20:14 by Stefan Dragnev
0
Stefan Dragnev

Support Runtime Callable Wrapper (RCW) future/partial mocking

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.
Feedback by Stefan Dragnev Status: New Comments: 1 Last update: 2014-05-29T09:46:42 by Stefan Dragnev
0
Troy Schmidt

Allow future mocking of an entire class

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.
Feature Request by Troy Schmidt Status: In Development Comments: 0 Last update: 2014-05-08T12:59:34 by Stefan Dragnev
0
Karl Shifflett

Stop asking me to allow usage to be sent to telerik

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.
Problem by Karl Shifflett Status: New Comments: 1 Last update: 2013-12-18T15:15:08 by Vladimir Dragoev
0
Displaying items 1 - 10 of 12