Pending Review
Last Updated: 10 Sep 2019 06:46 by ADMIN
Created by: Scott
Comments: 1
Type: Bug Report
0

I just installed it onto desktop, loaded Visual Studio 2019 (Ent) and i see no visual reference or otherwise to JustMock.

Honestly If i had have spent the $$ by now i'd have uninstalled and given up.

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