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
0 votes
Hi Guys,
I've just discovered a difference between the behaviour of Verify and VerifyWithTimeout which I think is a bug.

Please see the following simple testcase that demonstrates the difference. I would expect both to pass, but VerifyWithTimeout fails...

I'm using TypeMock 3.7.1

using NUnit.Framework;
using TypeMock;

namespace VerifyWithTimeout
{
   [TestFixture]
   public class VerifyWithTimeoutTests
   {
      [Test()]
      public void Verify()
      {
         MockManager.Init();

         Mock mock = MockManager.MockAll(typeof (TestClass));
         mock.ExpectGetAlways("Property", "MockedValue");

         MockManager.Verify();
      }


      [Test()]
      public void VerifyWithTimeout()
      {
         MockManager.Init();

         Mock mock = MockManager.MockAll(typeof (TestClass));
         mock.ExpectGetAlways("Property", "MockedValue");

         MockManager.VerifyWithTimeout();
      }
   }


   public class TestClass
   {
      public string Property
      {
         get { return "ActualValue"; }
      }
   }
}


Cheers,
Pete
________
Buy herbalaire
asked by pmcevoy (4.7k points)

3 Answers

0 votes
This is a bug :twisted:,
Thanks for the example.
we will fix this and send you a patch!
answered by scott (32k points)
0 votes
Cheers, Scott!
________
Mercedes-Benz 450Sel 6.9
answered by pmcevoy (4.7k points)
0 votes
Hi,

This issue has been resolved.
The fix was included in our latest release (4.0.2),
which can be loaded here: https://www.typemock.com/Downloads.php

Now there should not be any difference in the behaviour of the two API's
answered by lior (13.2k points)
...