public void Foo()
var product = new ProductPage();
product.Property["PageLink"] = new PropertyPageReference(PageReference.EmptyReference);
The same goes for ProductName. You can't use strongly typed properties :(
I'm trying to instaniate the ContentLink property of an object inheriting from pagedata. I want to do this to unit test episerver find but i think the question is general so I'll ask in this forum. So far I've tried
Which crashes at runtime saying the property doesn't exist. And
Which won't compile. I'm trying to instaniate a ContentInLanguageReference object to mock up some episerver find test results and disassembling it shows that it accesses the ContentLink and will (and does) crash if it is null
All help gratefully received.