chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
I am using Typemock Isolator 5.3.4 and Gallio MBUnit 3.0.6, and I found that there is a memory problem with Isolator.

Try the below code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MbUnit.Framework;
using TypeMock.ArrangeActAssert;
using TypeMock;

namespace MBUnitProblem
{
    [TestFixture, ClearMocks]
    public class BaseFixture
    {
        protected int count;
        [FixtureSetUp]
        public void FixtureSetUp()
        {
          
        }

        [SetUp]
        public virtual void SetUp()
        {
            

        }

        [TearDown]
        public void Clean()
        {
            count = 0;
        }



    }

    public class DerivedFixture : BaseFixture
    {

        public override void SetUp()
        {
            base.SetUp();
            count++;
            Assert.AreEqual<int>(1, count);
        }

        [Test, Isolated]
        public void test1()
        {
        }

        [Test, Isolated]
        public void test2()
        {
        }
    }
}



Run the test at class level using testdriven.net. Observe the PF usage by going to the Performance tab in Windows Task Manager.

Run the test many times, you will find that the PF usage climbs up all the time and won't come down until you close the IDE.

OTOH, if you remove all the reference to ClearMocks and Isolated, then you won't have such a PF usage climbing problem.
________
ASS FRENCH
asked by nsoonhui (59.1k points)

1 Answer

0 votes
Hi,

I managed to reproduce this case with MBUnit, however, i couldn't reproduce it with NUnit.

We'll investigate it, we're also investigating another similar case https://www.typemock.com/community/viewtopic.php?p=5773 .

I'll let you know as soon as we figure out the problem.

Best Regards,
Elisha
Typemock Support Team
answered by Elisha (12k points)
...