AnsweredAssumed Answered

Unittest code using AF SDK

Question asked by jonasengedal on Feb 24, 2015
Latest reply on Feb 25, 2015 by jonasengedal

How can I unit test code using AF SDK without connecting to the AF Database? The problem is there is no interfaces and I cannot instantiate AF objects without having a connection to the AF database.

 

I want to mock this interface:

 

public interface IAFRepository

{

    AFEventFrame CreateEventFrame(string eventFrameName, AFElementTemplate elementTemplate);

    AFEventFrame GetEventFrame(string id, string elementTemplateName);

    AFElement GetElementByPath(string path);

    AFElementTemplate GetElementTemplate(string elementTemplateName);

}

 

Any suggestions or clarifications?

 

Best regards

 

Jonas

Outcomes