Unit test PermanentLinkUtility

Vote:
 

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

PermanentLinkUtility

We use NSubstitute and Xunit test

all help is appreciated

// Junior dev in this world

#194000
Jun 11, 2018 11:44
Vote:
 

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.

#194050
Jun 12, 2018 9:44
Vote:
 

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

#194466
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.