Fluent, semantic assertions for normal QuickFIX/J Message values. Use it to check FIX versions, message types, headers, trailers, and typed field values with useful failure diagnostics.
Plain QuickFIX/J tests often repeat tag lookups, conversions, and hand-written error messages. AssertJ QuickFIX/J provides:
Assertions.assertThat(Message)as the fluent entry point.- FIX 4.0 through 4.4 and FIXT 1.1 application-version assertions.
- Semantic message methods such as
isNewOrderSingle()andisExecutionReport(). - Header and trailer chaining with
header(),trailer(), andand(). - Dictionary-aware, typed
hasFieldValue(tag, value)checks. - Generic
hasMsgType(code)andhasMsgTypeName(name)checks. - One test artifact that lets the consumer select QuickFIX/J.
| Library | Java | QuickFIX/J | Status |
|---|---|---|---|
1.1.x (main) |
11+ | 2.3.2 and 3.0.2 | In development; both are release gates |
| 1.0.x | 11+ | built with 2.3.2 | Published maintenance line |
CI runs Java 11, 17, and 21. See the full compatibility policy.
The current release is on Maven Central. Add it in test scope:
<dependency>
<groupId>io.allune</groupId>
<artifactId>assertj-quickfixj</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>testImplementation("io.allune:assertj-quickfixj:1.0.0")QuickFIX/J is intentionally provided. Your application or test suite must supply quickfixj-core and the message module it uses. This library does not change the engine version selected by the application.
import quickfix.Message;
import quickfix.field.BeginString;
import quickfix.field.MsgType;
import quickfix.field.OrdType;
import quickfix.field.Side;
import quickfix.field.Symbol;
import static io.allune.quickfixj.api.Assertions.assertThat;
Message message = new Message();
message.getHeader().setString(BeginString.FIELD, "FIX.4.4");
message.getHeader().setString(MsgType.FIELD, "D");
message.setString(Symbol.FIELD, "AAPL");
message.setChar(Side.FIELD, Side.BUY);
message.setChar(OrdType.FIELD, OrdType.LIMIT);
assertThat(message)
.isVersion44()
.isNewOrderSingle()
.hasFieldValue(Symbol.FIELD, "AAPL")
.hasFieldValue(Side.FIELD, Side.BUY)
.hasFieldValue(OrdType.FIELD, OrdType.LIMIT);assertThat(message)
.header()
.hasSenderCompID("CLIENT")
.hasTargetCompID("BROKER")
.and()
.trailer()
.hasChecksum("074")
.and()
.isNewOrderSingle();assertThat(message).hasMsgTypeName("NewOrderSingle");For FIXT 1.1, the library resolves the application dictionary from header tag 1128 (ApplVerID). FIX 5.0, FIX 5.0 SP1, and FIX 5.0 SP2 are supported by isVersion50(), isVersion50sp1(), and isVersion50sp2().
DataDictionary dictionary = new DataDictionary("path/to/FIX44-custom.xml");
assertThat(message)
.usingDataDictionary("FIX.4.4", dictionary)
.hasFieldValue(6000, "CustomValue");In 1.x, custom dictionary overrides are stored in a process-wide concurrent registry. Access is thread-safe, but conflicting overrides for the same FIX version can affect parallel tests and remain active for the process. Isolate such tests. Assertion-scoped configuration is planned for 2.0; see ADR 0003.
FixMock exposes recorded traffic as QuickFIX/J Message values, so no adapter is required:
Message received = fixMock.awaitMessage(newOrderSingle(), Duration.ofSeconds(5));
assertThat(received)
.isVersion44()
.isNewOrderSingle()
.hasFieldValue(Symbol.FIELD, "AAPL");Keep both libraries in test scope. The Spring Boot starter interoperability suite consumes their released artifacts and does not create a source dependency between repositories.
Requirements are JDK 11+ and Maven 3.8.6+. The canonical command is:
mvn --batch-mode verifyVerify QuickFIX/J 3.0.2 explicitly with:
mvn --batch-mode -Dquickfixj.version=3.0.2 verifyCI runs both 2.3.2 and 3.0.2 on Java 11, 17, and 21. It also checks dependency convergence, coverage, public API compatibility with 1.0.0, and a separately built packaged consumer.
- Documentation index
- Compatibility
- Roadmap
- Contributing
- Support policy
- Release process
- Release checklist
- Changelog
- Architecture decisions
- Security policy
- Repeating groups and components do not yet have dedicated fluent assertions.
- Custom dictionary overrides are process-wide in 1.x.
- Exact failure-message text is not a stable API unless a release note says otherwise.
Apache License 2.0.