From 3dbe6c09c06137a5cecdd63ff1c67f4eb7360433 Mon Sep 17 00:00:00 2001 From: KronosDP <darrel.danadyaksa19@gmail.com> Date: Wed, 26 Feb 2025 13:42:32 +0700 Subject: [PATCH] [REFACTOR] Update AuthenticationApplicationTests to verify main method execution --- .../authentication/AuthenticationApplicationTests.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/java/com/safetypin/authentication/AuthenticationApplicationTests.java b/src/test/java/com/safetypin/authentication/AuthenticationApplicationTests.java index 599099f..a528070 100644 --- a/src/test/java/com/safetypin/authentication/AuthenticationApplicationTests.java +++ b/src/test/java/com/safetypin/authentication/AuthenticationApplicationTests.java @@ -1,13 +1,13 @@ package com.safetypin.authentication; import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; -@SpringBootTest -class AuthenticationApplicationTests { +class AuthenticationApplicationTest { @Test - void contextLoads() { + void testMainDoesNotThrowException() { + // Calling the main method should load the context without throwing an exception. + assertDoesNotThrow(() -> AuthenticationApplication.main(new String[] {})); } - } -- GitLab