<?xml version="1.0" encoding="UTF-8"?>
<!--
  outbox-test-fixtures — JUnit Jupiter helpers for downstream tests.

  Public API:
    - @AutoConfigureOutbox            (test annotation)
    - TestOutboxRecordCaptor          (@Component, assertion API)
    - OutboxTestAutoConfiguration

  Consumed by service-side test code via:
    @SpringBootTest
    @AutoConfigureOutbox
    class FooServiceTest { ... }

  Per OQ-6 §1.5 in .planning/26-stage-b-outbox-parity.md.

  Note: this module declares its primary deps at compile scope (the
  fixtures are intended to be consumed in test scope by downstream
  modules — they MUST compile here, not just at downstream test-time).
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.aim2be</groupId>
        <artifactId>im2be-platform-libs-parent</artifactId>
        <version>1.1.0-SNAPSHOT</version>
    </parent>

    <artifactId>outbox-test-fixtures</artifactId>
    <packaging>jar</packaging>
    <name>im2be-platform-libs :: outbox-test-fixtures</name>
    <description>JUnit Jupiter test fixtures for outbox-publisher consumers (OQ-6 §1.5).</description>

    <dependencies>
        <dependency>
            <groupId>com.aim2be</groupId>
            <artifactId>outbox-publisher</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
        </dependency>
        <!-- Test-support deps at compile scope so the fixtures themselves
             reference JUnit / Spring test types. Downstream consumers
             inherit these transitively when they declare the dependency
             in test scope. -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-test</artifactId>
        </dependency>
        <!-- spring-boot-test-autoconfigure provides
             org.springframework.boot.test.autoconfigure.properties.PropertyMapping
             used by @AutoConfigureOutbox. Verified 2026-05-26 against
             https://docs.spring.io/spring-boot/api/java/org/springframework/boot/test/autoconfigure/properties/PropertyMapping.html -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-test-autoconfigure</artifactId>
        </dependency>

        <!-- Self-test -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- AutoConfigureOutboxIT exercises the @AutoConfigureOutbox
                 annotation through a real Spring Boot @SpringBootTest. It is
                 IT-suffixed so failsafe runs it post-package, keeping
                 surefire's fast-feedback loop for the pure unit tests. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
