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.
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

			
Completed
Last Updated: 23 Jul 2018 13:47 by Nacho
Created by: Stefan
Comments: 3
Type: Feature Request
3
I want to be able to arrange the return value of `new` expressions, like Mock.Arrange(() => new FileInfo()).Returns(mockFileInfo).
Then, I expect that `new FileInfo()` will always return my mock instance.
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: 01 Mar 2018 15:48 by ADMIN
Created by: G
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: 24 Nov 2015 08:37 by Simo
I have installed the trial version of JustMock to evaluate it. I have been trying to mock the static calls of Azure RoleEnvironment class, but the SetupStatic does not work. It seems to be calling the original method. Please see my simple test below:

[Test]
public void VerifyRoleEnvironment()
{
       bool expected = true;
       Mock.SetupStatic(typeof(RoleEnvironment), StaticConstructor.Mocked);
       Mock.Arrange(() => RoleEnvironment.IsAvailable).Returns(true);
       Assert.AreEqual(expected, RoleEnvironment.IsAvailable);
}
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");
Completed
Last Updated: 14 Oct 2015 08:25 by Stefan
Make Justmock full edition as easy to use as the lite edition. For my team to use Justmock in Visual Studio and have unit tests run in the build system outside of VS, it is not practical to have justmock "installed" on everyone's machine. the process environment variables that need to be set is also not practically due to our custom build system; the process to start VS on our dev's enlistments is complicated and tightly controlled. Also, the profiler interferes with VS Code Coverage and we shouldn't have to use another UI to add the profiler, as that has to be done on every machine. We have to resort to just using JustMock Lite.
Completed
Last Updated: 14 Oct 2015 08:23 by Stefan
We have some mission critical code that catches all exceptions and recovers from them in various ways.  I would like to be able to use Mock.Create<MyClass>(Behavior.Strict) so that I can know that none of the methods on MyClass are being called besides the ones I explicitly Mock.Arrange.  However, this results in the methods throwing exceptions which are then caught by my application and recovered from so I never see them.

I would like something like this, but where I didn't have to manually arrange every method on the class and instead have some Behavior that I could give to Mock.Create that would result in all of the arranges being auto-generated.  I could then manually arrange anything I didn't want to have OccursNever on, just like you can override the exceptions thrown by Behavior.Strict.


class MyClass
{
    public void Method1() { }
    public void Method2() { }
    public void Method3() { }
}
 
class ClassUnderTest
{
    public void DoSomething(MyClass myClass)
    {
        myClass.Method3();
    }
}
 
[Test]
void MyClass_methods_are_never_called()
{
    // ARRANGE
    var myClass = Mock.Create<MyClass>();
    Mock.Arrange(() => myClass.Method1()).OccursNever();
    Mock.Arrange(() => myClass.Method2()).OccursNever();
    Mock.Arrange(() => myClass.Method3()).OccursNever();
 
    // ACT
    var classUnderTest = new ClassUnderTest();
    classUnderTest.DoSomething(myClass);
 
    // ASSERT
    Mock.Assert(myClass); // this will fail
}
Completed
Last Updated: 30 Jun 2015 11:38 by Joe
Created by: Kaloyan
Comments: 1
Type: Feature Request
8
JustMock should be able to mock in WP8 assemblies.
Completed
Last Updated: 12 May 2015 08:12 by Stefan
ADMIN
Created by: Tsvetomir
Comments: 0
Type: Feature Request
1

			
Completed
Last Updated: 16 Sep 2014 08:02 by Peter Stefan
Created by: Peter Stefan
Comments: 2
Type: Feature Request
0
Remove obfuscation of exceptions thrown by JustMock, because they can cause failing builds on Jenkins
Completed
Last Updated: 30 Apr 2014 09:01 by Stefan
Created by: Eric
Comments: 1
Type: Feature Request
0
If possible, update Microsoft.Practices.ServiceLocation to 1.2 or change NuGet package to > 1.0 instead of = 1.0.
Completed
Last Updated: 29 Apr 2014 10:42 by Nacho
JustMock should work in multi-threaded scenarios.
Completed
Last Updated: 20 Mar 2014 12:38 by ADMIN
I'd like to be able to make recursive arrangements like Mock.Arrange(() => a.B.C.D).Returns(5) and to simultaneously specify that this arrangement should work on any instance, not just 'a'. If I simply use IgnoreInstance() in this case it will make an arrangement for the instance on which 'D' is called and not 'B' - so it doesn't work as I want it to.

What I'd like to do is simply state Mock.Arrange(() => Arg.IsAny<IFoo>().B.C.D).Returns(5) - in other words "Arrange for any object of type IFoo, when ".B.C.D" is called on it, that the value of D is 5.
1 2