ArchUnitã®æ¹ããªãã¬ã¯ã·ã§ã³APIãããå©ä¾¿æ§ãé«ãçç±
ã¯ããã«
ç§ãArchUnitãç解ããããã«å ¬å¼ããã¥ã¡ã³ããèªãã æã®ã¡ã¢ã§ããç¹ã«ãªãã¯ãªãã§ãã
ArchUnitã®æ¹ããªãã¬ã¯ã·ã§ã³APIãããå©ä¾¿æ§ãé«ãçç±
Why test your architecture? - ArchUnitã®ãWhy use ArchUnit?ãã«ãå©ä¾¿æ§ãé«ãçç±ãè¼ã£ã¦ãã¾ãã
å¼ç¨ãã¾ãã
ArchUnit provides simple predefined ways to test the typical standard cases, like package dependencies.
ArchUnitã¯ãããã±ã¼ã¸ã®ä¾åé¢ä¿ãªã©ãtypical standard cases(å ¸åçãªæ¨æºã±ã¼ã¹)ããã¹ãããããã®ç°¡åãªå®ç¾©æ¸ã¿ã®æ¹æ³ãæä¾ãã¾ãã
ããã¯ããªãã»ã©ã¼ãã£ã¦æãã§ããããªãã¬ã¯ã·ã§ã³APIã§ãã¹ããè¨è¿°ãããããtypical standard casesã«ã¤ãã¦ã¯ããã£ã¨ç°¡æ½ã§èªã¿ããããªãã®ã§ãããã
ã§ããç¶ãã¦æ¬¡ã®æç« ãããã¾ãã
But it also is fully extensible, providing a convenient way to write custom rules where imported classes can be accessed similarly to using the Reflection API.
In fact, the imported structure provides a natural way to use the full power of the Reflection API for your tests.
ãã ããå®å ¨ã«æ¡å¼µå¯è½ã§ãã¤ã³ãã¼ããããã¯ã©ã¹ã«Reflection APIã使ç¨ããã®ã¨åæ§ã«ã¢ã¯ã»ã¹ã§ããã«ã¹ã¿ã ã«ã¼ã«ãè¨è¿°ãã便å©ãªæ¹æ³ãæä¾ãã¾ãã
å®éãã¤ã³ãã¼ããããæ§é ã¯ããã¹ãç¨ã«Reflection APIã®ãã«ãã¯ã¼ã使ç¨ããèªç¶ãªæ¹æ³ãæä¾ãã¾ãã
ãtypical standard casesããã¹ãããæ¹æ³æä¾ãã¤ã¤ããfull power of the Reflection APIã使ç¨ããèªç¶ãªæ¹æ³ãæä¾ãã¦ããâ¦ï¼ãã©ãããAPIã®æ§æã«ãªã£ã¦ãããã ããï¼ï¼ãã¨ç§ã¯çåã«æãã¾ããã
ãã®çåã¯ArchUnit User Guide - 5. Ideas and Concepts ãèªãã¨è§£æ¶ããã¾ããã
ArchUnit is divided into different layers, where the most important ones are the "Core" layer, the "Lang" layer and the "Library" layer. In short the Core layer deals with the basic infrastructure, i.e. how to import byte code into Java objects. The Lang layer contains the rule syntax to specify architecture rules in a succinct way. The Library layer contains more complex predefined rules, like a layered architecture with several layers.
441/5000
ArchUnitã¯ãã¾ãã¾ãªã¬ã¤ã¤ã¼ã«åå²ãããæãéè¦ãªã¬ã¤ã¤ã¼ã¯ãCoreãã¬ã¤ã¤ã¼ããLangãã¬ã¤ã¤ã¼ããLibraryãã¬ã¤ã¤ã¼ã§ãã è¦ããã«ãCoreã¬ã¤ã¤ã¼ã¯åºæ¬çãªã¤ã³ãã©ã¹ãã©ã¯ãã£ãã¤ã¾ããã¤ãã³ã¼ããJavaãªãã¸ã§ã¯ãã«ã¤ã³ãã¼ãããæ¹æ³ãæ±ãã¾ãã Langã¬ã¤ã¤ã¼ã«ã¯ãç°¡æ½ãªæ¹æ³ã§ã¢ã¼ããã¯ãã£ã«ã¼ã«ãæå®ããããã®ã«ã¼ã«æ§æãå«ã¾ãã¦ãã¾ãã Libraryã¬ã¤ã¤ã¼ã«ã¯ãè¤æ°ã®ã¬ã¤ã¤ã¼ãæã¤ã¬ã¤ã¤ã¼ãã¢ã¼ããã¯ãã£ã®ãããªãããè¤éãªå®ç¾©æ¸ã¿ã«ã¼ã«ãå«ã¾ãã¦ãã¾ãã
ArchUnitã¯ã¬ã¤ã¤åããã¦æ§æããã¦ããã¨ããªãã»ã©ã§ãã