|
Re: How to test my plugin [message #46558 is a reply to message #46414] |
Wed, 11 February 2009 09:03 |
Eclipse User |
|
|
|
Originally posted by: eclipse.kfdd.mine.nu
Just curious - have you looked at this for CC integration:
http://www.ibm.com/developerworks/rational/library/content/0 3July/2500/2834/ClearCase/clearcase_plugins.html
Thanks,
--Fredrik
Mikael Petterson wrote:
> Hi,
>
> I am developing a plugin for Eclipse.
> I try to write a simple testcase but it turned out it was not that
> simple. This is the case.
>
> public class ClearcaseProvider extends RepositoryProvider {
> private final class RefreshStateOperation implements
> IRecursiveOperation {
>
> public IStatus visit(IResource resource, IProgressMonitor monitor) {
> StateCache cache =
> StateCacheFactory.getInstance().get(resource);
>
> }
> }
> }
>
> Ok I thought since I cannot mock a singleton I can check if I really
> need a singleton and make the coupling more lose. So I thought I could
> send an instance of StateCacheFacotry into the constructor of
> ClearcaseProvider class to make the two classes less tightly coupled.
> This is not possible since that constructor will never be called from
> the Eclipse framework.
> Any hints or pointers so I can test the plugin is very much appreciated.
>
> //mikael
>
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03528 seconds