Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: kotrick on March 11, 2015, 11:10:28 pm
-
Hello,
We have developed many plug-in's for Enterprise Architect and we are interested to do this activity in TestDriven Development.
We are developing plug-ins using visual c#(Visual studio 2010)
I want to write test cases for these add-ins.But have below issue:
How to get the repository object and start running test cases?
Can anyone please suggest or help me to identify solution for testing EA add-ins
Thanks in advance
-
Code for C++:
CLSID clsid;
CLSIDFromProgID(L"EA.App", &clsid);
IUnknown *pUnk = NULL;
IDispatch *pDisp = NULL;
HRESULT hr = GetActiveObject(clsid, NULL, (IUnknown**)&pUnk);
if(SUCCEEDED(hr)) {
hr = pUnk->QueryInterface(IID_IDispatch, (void **)&pDisp);
}
(from my Scripting book)
q.