Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

Unit test PermanentLinkUtility


Hi, we just upgraded to epi server 11, and i wonder how i can unit test


We use NSubstitute and Xunit test

all help is appreciated

// Junior dev in this world

Jun 11, 2018 11:44

PermanentLinkUtility is basically just static methods making it hard to Mock. What method are you using (there might be other alternatives)? Otherwise you can always make your own abstraction around the PermanentLinkUtility usage and then mock your own abstraction.

Jun 12, 2018 9:44

Many thanks!, i made my own abstraction around and was able to test my code 

Jun 21, 2018 17:19
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.