@@ -37,16 +37,22 @@ public abstract class AbstractTacticArchUnitTest {
3737
3838 /**
3939 * Implement this method to define the Bounded Context name.
40+ *
41+ * @return A string that defines the Bounded Context name.
4042 */
4143 protected abstract String getBoundedContextName ();
4244
4345 /**
4446 * Implement this method to define against which CML file you want to test.
47+ *
48+ * @return A string that provides the file path to the CML file.
4549 */
4650 protected abstract String getCMLFilePath ();
4751
4852 /**
4953 * Implement this method to defined the java package within which you want to test.
54+ *
55+ * @return A string that represents the Java package name against you want to test.
5056 */
5157 protected abstract String getJavaPackageName2Test ();
5258
@@ -59,6 +65,8 @@ protected void setup() {
5965
6066 /**
6167 * Override this method to change class import behavior.
68+ *
69+ * @return JavaClasses object.
6270 */
6371 protected JavaClasses importClasses () {
6472 return new ClassFileImporter ()
@@ -68,57 +76,79 @@ protected JavaClasses importClasses() {
6876
6977 @ Test
7078 void aggregatesShouldBeModeledInCML () {
71- aggregateClassesShouldBeModeledInCml (context ).check (classes );
79+ aggregateClassesShouldBeModeledInCml (context )
80+ .allowEmptyShould (true )
81+ .check (classes );
7282 }
7383
7484 @ Test
7585 void aggregatesShouldAdhereToCmlAggregateStructure () {
76- aggregatesShouldAdhereToCmlStructure (context ).check (classes );
86+ aggregatesShouldAdhereToCmlStructure (context )
87+ .allowEmptyShould (true )
88+ .check (classes );
7789 }
7890
7991 @ Test
8092 void modulesShouldBeModeledInCML () {
81- modulePackagesShouldBeModeledInCml (context ).check (classes );
93+ modulePackagesShouldBeModeledInCml (context )
94+ .allowEmptyShould (true )
95+ .check (classes );
8296 }
8397
8498 @ Test
8599 void entitiesShouldBeModeledInCML () {
86- entityClassesShouldBeModeledInCml (context ).check (classes );
100+ entityClassesShouldBeModeledInCml (context )
101+ .allowEmptyShould (true )
102+ .check (classes );
87103 }
88104
89105 @ Test
90106 void valueObjectsShouldBeModeledInCML () {
91- valueObjectClassesShouldBeModeledInCml (context ).check (classes );
107+ valueObjectClassesShouldBeModeledInCml (context )
108+ .allowEmptyShould (true )
109+ .check (classes );
92110 }
93111
94112 @ Test
95113 void domainEventsShouldBeModeledInCML () {
96- domainEventClassesShouldBeModeledInCml (context ).check (classes );
114+ domainEventClassesShouldBeModeledInCml (context )
115+ .allowEmptyShould (true )
116+ .check (classes );
97117 }
98118
99119 @ Test
100120 void servicesShouldBeModeledInCML () {
101- serviceClassesShouldBeModeledInCml (context ).check (classes );
121+ serviceClassesShouldBeModeledInCml (context )
122+ .allowEmptyShould (true )
123+ .check (classes );
102124 }
103125
104126 @ Test
105127 void repositoriesShouldBeModeledInCML () {
106- repositoryClassesShouldBeModeledInCml (context ).check (classes );
128+ repositoryClassesShouldBeModeledInCml (context )
129+ .allowEmptyShould (true )
130+ .check (classes );
107131 }
108132
109133 @ Test
110134 void entitiesShouldAdhereToCmlStructure () {
111- entitiesShouldAdhereToCmlEntityStructure (context ).check (classes );
135+ entitiesShouldAdhereToCmlEntityStructure (context )
136+ .allowEmptyShould (true )
137+ .check (classes );
112138 }
113139
114140 @ Test
115141 void valueObjectsShouldAdhereToCmlStructure () {
116- valueObjectsShouldAdhereToCmlValueObjectStructure (context ).check (classes );
142+ valueObjectsShouldAdhereToCmlValueObjectStructure (context )
143+ .allowEmptyShould (true )
144+ .check (classes );
117145 }
118146
119147 @ Test
120148 void domainEventsShouldAdhereToCmlStructure () {
121- domainEventsShouldAdhereToCmlDomainEventStructure (context ).check (classes );
149+ domainEventsShouldAdhereToCmlDomainEventStructure (context )
150+ .allowEmptyShould (true )
151+ .check (classes );
122152 }
123153
124154}
0 commit comments