Hi,
Currently I am having problems running test cases where I mock classes from third party libraries.
I can successfully mock basic tests such as the one below which assures me that TypeMock is running correctly:
[TestFixture]
public class StopLossStrategyManagerTests
{
[SetUp]
public void Setup()
{
// empty pre-test code that should be run
MockManager.Init();
}
[TearDown]
public void TearDown()
{
// empty post-test code that should be run
MockManager.Verify();
}
[Test]
[ExpectedException(typeof(InvalidOperationException))]
public void TestOne()
{
throw new System.InvalidOperationException("Invalid op", null);
}
}
But the minute I try to write a Test Fixture such as the one below where the ICustomEntry interface is from a third party dll:
[Test]
public void GetPriceTestBuyBelowBid()
{
Mock entryMock = MockManager.MockObject(typeof(ICustomEntry));
}
I get the following error:
TestCase 'StopLoss.UnitTests.StopLossStrategyManagerTests.GetPriceTestBuyBelowBid'
failed: System.IO.FileLoadException : A procedure imported by 'TritonDotNetAPI' could not be loaded.
at StopLoss.UnitTests.StopLossStrategyManagerTests.GetPriceTestBuyBelowBid()
Any help would be appreciated.
Thanks