Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
The old .Url property on IPublishedContent is marked as obsolete and will dissapear. It has been replaced by an extension method in Umbraco.Web namespace.
The old .Url property was easy to mock:
content.Setup(x => x.Url).Returns(url);
Now it doesn't work to mock the Setup of the property because it is an extension method and they can't be mocked. Using a wrapper around the extension method doesn't work either.
If I skip setting up the extension method then my unit tests will throw a null reference exception because the UmbracoMapper lib from Andy Butland requires the Url() to be set.
See conversation on twitter: https://twitter.com/dadolfi/status/1355120357301231618
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted