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