Last Updated: 20 May 2019 09:26 by ADMIN
Lyubomir Rusev
Created on: 12 Sep 2018 13:50
Type: Bug Report
Call to Arrange method wrongly mocks property used as parameter
A class property get wrongly mocked when used as parameter for arranging other class methods. The following sample demonstrates the scenario:

class Foo
	public string Prop{ get; set; }

	public void Bar(string val)

public void Sample()
	var sut = Mock.Create<Foo>(Behavior.CallOriginal);

	Mock.Arrange(() => sut.Bar(sut.Prop)).DoNothing();
1 comment
Posted on: 20 May 2019 09:25
This item is fixed and it is available with Telerik JustMock R2 2019 release

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items