You need to sign in before continuing.
ApplicationContextTest.java 792 Bytes
package com.xly.erp;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;
import org.springframework.beans.factory.annotation.Autowired;

import static org.junit.jupiter.api.Assertions.assertNotNull;

/**
 * REQ-USR-001 — Boot smoke test:
 * verifies Spring Boot context starts and Flyway has applied V1 against the
 * MySQL schema configured via .env.local (DB_HOST/DB_PORT/DB_USER/DB_PASSWORD/DB_SCHEMA).
 */
@SpringBootTest
@org.springframework.test.context.ActiveProfiles("test")
class ApplicationContextTest {

    @Autowired
    private ApplicationContext ctx;

    @Test
    void contextLoads() {
        assertNotNull(ctx, "Spring ApplicationContext should be initialised");
    }
}