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
Hi,
The problem is that True Properties dont work with inheritance. Simple example:

        public interface IBaseInterface
        {
            int BaseProperty { set; get;}
        }

        public interface IExtendedInterface : IBaseInterface
        {
            int ExtendedProperty { set; get; }
        }

        [Test, Isolated]
        public void mytest()
        {
            var testedClass = Isolate.Fake.Instance<IExtendedInterface>();

            testedClass.BaseProperty = 1;
            testedClass.ExtendedProperty = 2;

            Assert.AreEqual(2, testedClass.ExtendedProperty);
            Assert.AreEqual(1,testedClass.BaseProperty);
        }
 


Second assertion failed:
Expected: 1 But was: 0

So base property does not store its value.

Is it any workaround on this problem? Will it be fixed soon?

br
tlucz
asked by tlucz (2.9k points)

4 Answers

0 votes
Hi,

This issue is already fixed and it will available in the next version of Isolator that will be out next week.
I'm sending you a link to download the preview for this version.

Please let me know if it solves the problem.
answered by ohad (35.5k points)
0 votes
Hi, I have the same issue with version 5.4.5.0.
Is there an update available?
answered by patrick.gill@verint. (2.6k points)
0 votes
Hi Patrick,

The fix is included in version 5.4.5 so you may have a different problem.
Can you please post here a simple repro of the problem you see?
answered by ohad (35.5k points)
0 votes
Ooops, problem was in my test.
My syntax was wrong in my validation checking wether the property had been set.
answered by patrick.gill@verint. (2.6k points)
...