I am working on a plugin that an editor adds to an existing JDT (Java) editor using aspects.
Now Eclipse text editors derived from AbstractTextEditor , organized in clear components, following MVC . Those components access through exact paths, such as matching . You can find one example of a user primitive and assumptions that it can (and does) use for editor behavior here .
I would like to write tasteless unit tests against these assumptions , which will verify that my weaving through aspects has not broken the path. For example, in the case of reconciliation, I would like to open the editor, enter the incorrect content (for some reconciliation strategies), wait a while and make sure that the problems were really reported.
Pay attention to what problems are reported or how they will be signaled by the user in the user interface component I am not interested in: I want to check that my replacement of SourceViewer for the user one using aspects does not violate the logic of the editor, and not my specific matching strategy.
(In fact, I would probably mock this test. Also, testing the user interface, which is apparently not headless, is beyond the scope of my question.)
This seems to be easy to do if the appropriate structure existed. They? Is there any test environment or mockups in sync with Eclipse with architectural assumptions that would allow me to do what I mean ? This will have to reproduce the workflow behavior of the existing Eclipse editor. Of course, that would be among Eclipse's own tests, right? ... even though I can't seem to find anything. Any ideas?
source share