Completed
Last Updated: 20 May 2019 09:26 by ADMIN
ADMIN
Lyubomir Rusev
Created on: 12 Sep 2018 13:50
Type: Bug Report
1
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)
	{
	}
}

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

	Mock.Arrange(() => sut.Bar(sut.Prop)).DoNothing();
}
1 comment
ADMIN
Mihail
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