File tree Expand file tree Collapse file tree
main/java/it/aboutbits/springboot/emailservice/lib
test/java/it/aboutbits/springboot/emailservice Expand file tree Collapse file tree Original file line number Diff line number Diff line change 109109 <artifactId >archunit-toolbox</artifactId >
110110 <scope >test</scope >
111111 </dependency >
112+ <dependency >
113+ <groupId >it.aboutbits</groupId >
114+ <artifactId >spring-boot-testing</artifactId >
115+ <version >2.5.0</version >
116+ </dependency >
112117 </dependencies >
113118
114119 <build >
Original file line number Diff line number Diff line change 11package it .aboutbits .springboot .emailservice .lib ;
22
3+ import org .jspecify .annotations .NullMarked ;
4+
5+ @ NullMarked
36public enum EmailState {
47 PENDING ,
58 SENT ,
Original file line number Diff line number Diff line change 1+ package it .aboutbits .springboot .emailservice ;
2+
3+ import com .tngtech .archunit .junit .AnalyzeClasses ;
4+ import com .tngtech .archunit .junit .CacheMode ;
5+ import it .aboutbits .archunit .toolbox .ArchitectureTestBase ;
6+ import org .jspecify .annotations .NullMarked ;
7+
8+ @ AnalyzeClasses (
9+ packages = ArchitectureTest .PACKAGE ,
10+ cacheMode = CacheMode .PER_CLASS
11+ )
12+ @ NullMarked
13+ class ArchitectureTest extends ArchitectureTestBase {
14+ static final String PACKAGE = "it.aboutbits.springboot.emailservice" ;
15+ }
Original file line number Diff line number Diff line change 11package it .aboutbits .springboot .emailservice ;
22
3+ import org .jspecify .annotations .NullMarked ;
34import org .springframework .boot .SpringApplication ;
45import org .springframework .boot .autoconfigure .SpringBootApplication ;
56
67@ SuppressWarnings ("checkstyle:HideUtilityClassConstructor" )
78@ SpringBootApplication
89@ EnableEmailService
10+ @ NullMarked
911public class TestApplication {
1012 public static void main (final String [] args ) {
1113 SpringApplication .run (TestApplication .class , args );
Original file line number Diff line number Diff line change 66import it .aboutbits .springboot .emailservice .lib .exception .EmailException ;
77import it .aboutbits .springboot .emailservice .support .database .WithPostgres ;
88import jakarta .mail .internet .MimeMessage ;
9+ import org .jspecify .annotations .NullMarked ;
910import org .junit .jupiter .api .BeforeEach ;
1011import org .junit .jupiter .api .Test ;
1112import org .springframework .beans .factory .annotation .Autowired ;
3031
3132@ SpringBootTest
3233@ WithPostgres
34+ @ NullMarked
3335class ManageEmailTest {
3436 @ MockitoSpyBean
3537 JavaMailSender javaMailSender ;
Original file line number Diff line number Diff line change 55import it .aboutbits .springboot .emailservice .lib .jpa .EmailRepository ;
66import it .aboutbits .springboot .emailservice .support .database .WithPostgres ;
77import it .aboutbits .springboot .emailservice .support .database .factory .EmailFactory ;
8+ import org .jspecify .annotations .NullMarked ;
89import org .junit .jupiter .api .Test ;
910import org .springframework .beans .factory .annotation .Autowired ;
1011import org .springframework .boot .test .context .SpringBootTest ;
1920
2021@ SpringBootTest
2122@ WithPostgres
23+ @ NullMarked
2224class QueryEmailTest {
2325 @ MockitoBean
2426 JavaMailSender javaMailSender ;
Original file line number Diff line number Diff line change 22
33import lombok .Data ;
44import lombok .extern .log4j .Log4j2 ;
5+ import org .jspecify .annotations .NullMarked ;
56import org .junit .jupiter .api .extension .AfterEachCallback ;
67import org .junit .jupiter .api .extension .BeforeAllCallback ;
78import org .junit .jupiter .api .extension .ExtensionContext ;
1718import java .util .StringJoiner ;
1819
1920@ Log4j2
21+ @ NullMarked
2022public class PostgresTestcontainer implements BeforeAllCallback , AfterEachCallback {
2123 public static final PostgreSQLContainer <?> POSTGRES_CONTAINER ;
2224 private static final Set <String > TABLES_TO_IGNORE = Set .of (
Original file line number Diff line number Diff line change 22
33import it .aboutbits .springboot .emailservice .lib .EmailState ;
44import it .aboutbits .springboot .emailservice .lib .model .Email ;
5- import net .datafaker .Faker ;
5+ import it .aboutbits .springboot .testing .testdata .FakerExtended ;
6+ import org .jspecify .annotations .NullMarked ;
67
78import java .time .OffsetDateTime ;
89import java .util .List ;
910
11+ @ NullMarked
1012public final class EmailFactory {
11- private static final Faker FAKER = new Faker ();
13+ private static final FakerExtended FAKER = new FakerExtended ();
1214
1315 private EmailFactory () {
1416 }
You can’t perform that action at this time.
0 commit comments