Approved
Last Updated: 17 Jan 2019 15:08 by ADMIN
2019.R1 JustMock Test project templates need to be updated to support .Net Core, currently they are targeting just .Net Framework (see attached screen shot).
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!
Approved
Last Updated: 08 Oct 2018 10:50 by ADMIN
Currently, there is no out of  the box support for passing "out" and "ref" parameters for nonpublic API.
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
    }
}
Approved
Last Updated: 13 Sep 2018 06:41 by ADMIN
A class property get wrongly mocked when used as parameter for arranging other class methods. The following sample demonstrates the scenario:

class Foo
{
	public string Prop{ get; set; }

	public void Bar(string val)
	{
	}
}

[TestMethod]
public void Sample()
{
	var sut = Mock.Create<Foo>(Behavior.CallOriginal);

	Mock.Arrange(() => sut.Bar(sut.Prop)).DoNothing();
}
Approved
Last Updated: 07 Aug 2018 08:00 by Ivo
Mocking an async calls alse triggers hidden mocking of the return type. Depending of the type it might cause unexpected behavior or exception.
Merged
Last Updated: 12 Sep 2018 14:04 by ADMIN
MbUnitContextResolver gets wrongly initialized because of the weak check based on Gallio.Framework.Assertions.AssertionException type presence in the current app domain. Needs to be improved with some additional type check from mbunit assembly, MbUnit.Framework.TestFixtureAttribute for example.
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
Approved
Last Updated: 06 Dec 2018 18:40 by philip
Docker is a container acting like an isolated environment. Research how the JustMock profiler can be registered into such container.
Hosted VSTS should work on the same principle. Research how the registry could be accessed through VSTS extension or other tools.
Completed
Last Updated: 16 Jan 2019 08:39 by ADMIN
Created by: Robert
Comments: 7
Type: Feature Request
13

			
Approved
Last Updated: 29 Nov 2017 14:20 by ADMIN
ADMIN
Created by: Mihail
Comments: 0
Type: Feature Request
5
AxoCover is test runner and a code coverage tool.

https://marketplace.visualstudio.com/items?itemName=axodox1.AxoCover

https://github.com/axodox/AxoCover
Approved
Last Updated: 06 Aug 2018 07:41 by ADMIN
Asynchronous test execution might be run in a separate thread (it depends of the environment and it is completely transparent) which causes arrangements to lose their context. That is why the expected mocked return value for DateTime.UtcNow calls the original code and finally the test fails.
Approved
Last Updated: 23 Jul 2018 12:16 by ADMIN
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.
New
Last Updated: 18 Oct 2017 14:56 by Stacey
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.
Rejected
Last Updated: 12 Oct 2018 10:25 by ADMIN
Created by: Nick
Comments: 1
Type: Feature Request
0
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'.
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.
New
Last Updated: 19 Apr 2017 08:19 by Maxim
Created by: Maxim
Comments: 0
Type: Bug Report
0
I have logging class which are using everywhere.
I want to Mock this class for all tests. And i tried to use AssemblyInitialize but got problem. I have simulated this problem with JustMock.ElevatedExamples.AdvancedUsage examples:
1) Add BaseTest class
 [TestClass]
    public class BaseTest
    {
        [AssemblyInitialize()]
        public static void AssemblyInit(TestContext context)
        {
            Mock.SetupStatic(typeof(Common1), StaticConstructor.Mocked);
            // Arranging: When the static(Foo.FooProp_GET) property is called, it should return expected.
            var fakeUsed = Mock.Create<LogWriter1>(Constructor.Mocked);
            Mock.Arrange(() => Common1.Log).Returns(fakeUsed);
        }

        [AssemblyCleanup]
        public static void Cleanup()
        {
            //clean up stuff here
        }
    }
    public static class Common1
    {
        static Common1()
        {

            Log = new LogWriter1();

        }

        public static LogWriter1 Log { get; set; }

    }

    public class LogWriter1
    {

    }

2) When run test from VS - all ok
3) When run from command line it is not working. Show Message box "Process Starts Now".

SET JUSTMOCK_INSTANCE=1
SET COR_ENABLE_PROFILING=1
SET COR_PROFILER={B7ABE522-A68F-44F2-925B-81E7488E9EC0}
"C:\Program Files (x86)\Telerik\JustMock\Libraries\JustMockRunner.exe" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\MSTest.exe" /testcontainer:"D:\test\CSExamples\JustMock.ElevatedExamples\bin\Debug\JustMock.ElevatedExamples.dll"

How i can mock logger for all test? It is static public property.

I use MS Test + VS 2015.
Merged
Last Updated: 12 Sep 2018 14:04 by ADMIN
ADMIN
Created by: Kamen Ivanov
Comments: 1
Type: Feature Request
3
It would be good if we could use named parameters inside Mock.Arrange method.
Rejected
Last Updated: 12 Oct 2018 10:29 by ADMIN
When using Mock.CreateLike<> we've found that trying to directly mock anything lower than two layers down on a concrete class (e.g. x => x.Layer1.Layer2.Property == "test") throws a NullReferenceException unless the profiler is enabled. It wasn't clear in the exception or the documentation relating to this method that the real issue was the profiler being disabled, and only by trial and error did we find the solution.
1 2 3 4