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
}
Declined
Last Updated: 14 Oct 2015 08:18 by Stefan
Created by: Sebastian
Comments: 1
Type: Feature Request
0
Does Telerik JustMock work for Windows 8.1 environment?
We have a solution targeting Windows 8.1. 
I haven't been able to use Telerik JustMock.
Is there any workaround to make it work or some planned release for this  framework.
Best regards,
Sebas
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
Declined
Last Updated: 26 May 2014 14:35 by Stefan
Created by: Kaloyan
Comments: 1
Type: Feature Request
1
Using InOrder() in the arrange sometimes may be not appropriate. I would like to be able to do this in the assert. Instead of having the following workflow:
//Arrange (initial conditions)
// setup expected results (ordering)
// Act
// Assert

, I will have this:
//Arrange
//Act
// Assert (expected results in order)
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.
Completed
Last Updated: 10 Jan 2014 09:04 by ADMIN
1. Load the attached project in Visual Studio 2013.
2. Update the NuGet packages (NUnit).
3. Update the reference to JustMock to point to the correct path to a retail version of Telerik.JustMock.dll.
4. Run tests in NUnit runner (or any other runner that will run them in the same process/sequentially.
5. --> Notice that the first TestCase will pass, the second will fail.
6. Run the two test cases separately.
7. --> Notice that they both pass.
8. Remove the reference to Telerik.JustMock.dll.
9. Use NuGet to get the latest JustMock Lite.
10. Run the tests again.
11. --> Notice that they both pass.

This appears to be a bug with JustMock (retail) 2013.3.1119.2.  The bug does not reproduce when using JustMock Lite from NuGet.

If you drop into a debugger and step through both tests in a row you see the following behavior:
1. When the first test is started (after SetUp has been called) FlagA is correctly set to true and FlagB is defaulted to false.
2. When you step over the Mock.Arrange, FlagA is still true and FlagB is set to the value of input (order of running tests doesn't appear to matter, second always fails).
3. When the second test starts (after SetUp has been called again) Flag A is correctly set to true and FlagB is defaulted to false.
4. When you step over the Mock.Arrange, FlagB is set to the value of input but FlagA has been reverted to default!

If you add several other properties to the interface they will all be reset to default (no matter how many you arrange) when the second test executes the Mock.Arrange.

This bug reproduces without the JustMock profiler attached, and also with the profiler attached.

The version of JustMock Lite that was tested against is 2014.1.1217.4.  When I run the Telerik Control Panel I am not prompted to update my version of JustMock beyond 2013.3.1119.2 (perhaps this bug is already fixed and I just need to figure out how to upgrade).
Completed
Last Updated: 06 Nov 2013 10:30 by Ovidiu
Hi,


Since I upgraded my JustMock I was unable to debug ASP.NET projects. I accidentally found a resolution to the problem here:

http://stackoverflow.com/questions/19415275/asp-net-mvc4-code-not-running

"If you are using Telerik JustMock as a mocking framework and have recently updated it to the 2013 Q3 version, it causes this exact problem. I was able to resolve this issue by uninstalling the mocking framework and installing the 2013 Q2 version."

So I uninstalled JustMock and everything came to normal.


Regards,
Ovidiu
Completed
Last Updated: 04 Nov 2013 16:02 by ADMIN
using NUnit.Framework;
using Telerik.JustMock;

namespace Example
{
    public class MyClass
    {
        public MyClass(int a = 5) { }
    }

    [TestFixture]
    public class TestMyClass
    {
        [Test]
        public void test_MyClass()
        {
            Mock.Create<MyClass>(Behavior.CallOriginal);
        }
    }
}

Telerik.JustMock.MockException : Can not instantiate proxy of class: Example.MyClass.
Could not find a parameterless constructor.
   at Telerik.JustMock.Core.MocksRepository.Create(Type type, MockCreationSettings settings)
   at Telerik.JustMock.MockBuilder.Create(MocksRepository repository, Type type, Object[] constructorArgs, Nullable`1 behavior, Type[] additionalMockedInterfaces, Nullable`1 mockConstructorCall, IEnumerable`1 additionalProxyTypeAttributes, List`1 supplementaryBehaviors, List`1 fallbackBehaviors, List`1 mixins)
   at Telerik.JustMock.Mock.<>c__DisplayClass5b`1.<Create>b__5a()
   at Telerik.JustMock.Core.ProfilerInterceptor.GuardInternal[T](Func`1 guardedAction)
   at Telerik.JustMock.Mock.Create[T](Behavior behavior, Object[] args)
   at Example.TestMyClass.test_MyClass() in c:\users\micah\Documents\Source\Test\Test\Class1.cs:line 17#0

This appears to be related to the recent fix for "Improve exception message for Mock.Create".  Without Behavior.CallOriginal it works.  Supplying a parameter also works.
Completed
Last Updated: 04 Nov 2013 15:55 by ADMIN
Created by: Thomas
Comments: 3
Type: Bug Report
0
I need to be able to mock in Winrt. If that is already possible, then you need to spell out in example form how that is done.
Completed
Last Updated: 07 Oct 2013 11:12 by Chris Eargle
Created by: Chris Eargle
Comments: 0
Type: Feature Request
1
"After struggling with TypeMock for an hour, I gave #JustMock a try and it works great! Thanks."

https://twitter.com/JohnFecko/status/316211813761040384 
Completed
Last Updated: 07 Oct 2013 11:05 by Micah
Created by: Micah
Comments: 0
Type: Feature Request
1
Given:
public abstract class Foo
{
}

[Test]
public void test_foo()
{
    Mock.Create<Foo>(Behavior.Strict, Constructor.Mocked);
}

An exception is thrown at runtime saying "Abstract Type is not Accessible for Inheritance".  This doesn't lead you to the actual problem which is that I accidentally swapped the Behavior and the Constructor in the parameter order.  The same problem can occur if you attempt to call a constructor on an abstract object with the wrong number of parameters like so:
public abstract class Foo
{
    public Foo(int a, string b)
    {
    }
}

[Test]
public void test_foo()
{
    Mock.Create<Foo>(1, "foo", null);
}

This seems to be a problem with the compiler choosing the wrong overload to call and unfortunately there aren't a lot of solutions without changing the Create API.  Perhaps having an alternative to Mock.Create that is more explicit that we can use to avoid typos leading to exceptions that are difficult to make sense of or a hint in the exception message that suggests what the root cause might be?
Completed
Last Updated: 27 Aug 2013 06:39 by Omer
Created by: Omer
Comments: 0
Type: Bug Report
0
Hi there, I'm a developer on OzCode, a Visual Studio extension ( www.oz-code.com ).

We've received some complaints from customers that OzCode is incompatible with JustCode. I installed JustMock, and saw that when Visual Studio starts up, JustMock it seems to be causing a crash in a child process that OzCode spawns off of devenv.exe, which is called 'BugAidMetadataLoader.exe':

The exception in this process is:

Additional information: Could not load type 'Telerik.JustMock.Profiler' from assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

I would guess that JustMock is unintentionally causing the process to be loaded with a CLR Profiler attached and injecting code into it, and the injected code causes the crash.

Could you please provide some advice on how to avoid this, or possibly provide a fix?

Thank you very much,
 - Omer Raviv, OzCode
Completed
Last Updated: 04 Jun 2013 06:40 by Keith
I use NCrunch, a popular test runner. But it cannot seem to activate the JustMock profiler properly. So tests that require use of the JustMock profiler do not work properly.
Completed
Last Updated: 23 May 2013 13:14 by Kaloyan
ADMIN
Created by: Mihail
Comments: 1
Type: Feature Request
3
JustMock should be able to mock private methods in Silverlight.