Checking UML Design Patterns in Java Implementations - Pires, Waldemar; Ramalho, Franklin; Ledo, Anderson; Serey, Dalton (Anais do Simpósio Brasileiro de Componentes, Arquiteturas e Reutilização de Software (SBCARS); 2010: Anais do IV Simpósio Brasileiro de Componentes, Arquiteturas e Reutilização de Software, 2010)
In a previous work, we presented a technique that allows verifying the conformance between Java implementations and UML class diagrams, using design tests. While it allowed verifying conformance it does so in a sense that does not deal adequately with some design patterns. In such scenarios, there are semantic constraints among the involved elements that UML does not allow our technique to recognize them. Therefore, if one evolves the implementation violating the design pattern, the generated design tests will no longer be capable of detecting the design violation. To address this problem, we propose in this paper an approach based on: (1) UML profiles to explicitly tag UML incorporating design patterns; and (2) a set of design test templates able to recognize the appropriate implementation of these design patterns on Java code. We also present a prototype capable of automatically generating the design tests to verify the design patterns explicated by the UML profile.