@@ -10,13 +10,14 @@ inspired by Minecraft's DataFixer Upper (DFU), with a focus on **simplicity**, *
1010
1111---
1212
13- ## ✨ Features (v0.1 .0)
13+ ## ✨ Features (v0.2 .0)
1414
1515- ✅ ** Schema-Based Versioning** — Define data types per version with ` Schema ` and ` TypeRegistry `
1616- ✅ ** Forward Patching** — Apply ` DataFix ` instances sequentially to migrate data across versions
1717- ✅ ** Format-Agnostic** — Work with any serialization format via ` Dynamic<T> ` and ` DynamicOps<T> `
1818- ✅ ** Codec System** — Bidirectional transformation between typed Java objects and dynamic representations
1919- ✅ ** Type Safety** — Strong typing with ` TypeReference ` identifiers for data routing
20+ - ✅ ** Testkit** — Fluent test data builders, custom assertions, and test harnesses for DataFix testing
2021- ✅ ** JDK 17+** — Built and tested on modern LTS JVMs
2122
2223---
@@ -26,6 +27,7 @@ inspired by Minecraft's DataFixer Upper (DFU), with a focus on **simplicity**, *
2627- ** aether-datafixers-api** — Core interfaces and API contracts (no implementation logic)
2728- ** aether-datafixers-core** — Default implementations of the API interfaces
2829- ** aether-datafixers-codec** — Codec implementations for serialization formats
30+ - ** aether-datafixers-testkit** — Testing utilities for DataFix, Schema, and migration testing
2931- ** aether-datafixers-examples** — Practical examples demonstrating real-world usage
3032- ** aether-datafixers-bom** — Bill of Materials for coordinated dependency management
3133
@@ -282,6 +284,66 @@ public class MyFix extends SchemaDataFix {
282284
283285---
284286
287+ ## 🧪 Testing with Testkit
288+
289+ The ` aether-datafixers-testkit ` module provides utilities for testing your migrations:
290+
291+ ``` java
292+ import de.splatgames.aether.datafixers.testkit.TestData ;
293+ import de.splatgames.aether.datafixers.testkit.factory.QuickFix ;
294+ import de.splatgames.aether.datafixers.testkit.harness.DataFixTester ;
295+ import static de.splatgames.aether.datafixers.testkit.assertion.AetherAssertions.assertThat ;
296+
297+ @Test
298+ void testFieldRename() {
299+ // Create a quick fix for testing
300+ var fix = QuickFix . renameField(
301+ GsonOps . INSTANCE , " rename_player_name" , 1 , 2 ,
302+ " playerName" , " name"
303+ );
304+
305+ // Create test data fluently
306+ Dynamic<JsonElement > input = TestData . gson(). object()
307+ .put(" playerName" , " Alice" )
308+ .put(" level" , 10 )
309+ .build();
310+
311+ // Apply and verify
312+ Dynamic<JsonElement > result = DataFixTester . forFix(fix)
313+ .withInput(input)
314+ .forType(" player" )
315+ .apply();
316+
317+ // Use custom assertions
318+ assertThat(result)
319+ .hasStringField(" name" , " Alice" )
320+ .hasIntField(" level" , 10 )
321+ .doesNotHaveField(" playerName" );
322+ }
323+ ```
324+
325+ ### Testkit Features
326+
327+ | Component | Description |
328+ | -----------| -------------|
329+ | ** TestData** | Fluent builders for creating test data (` TestData.gson().object()... ` ) |
330+ | ** AetherAssertions** | Custom AssertJ assertions for ` Dynamic ` , ` DataResult ` , ` Typed ` |
331+ | ** DataFixTester** | Test harness for isolated DataFix testing |
332+ | ** QuickFix** | Factory methods for common fix patterns (rename, add, remove, transform) |
333+ | ** MockSchemas** | Mock schema utilities for testing |
334+
335+ Add to your project:
336+
337+ ``` xml
338+ <dependency >
339+ <groupId >de.splatgames.aether.datafixers</groupId >
340+ <artifactId >aether-datafixers-testkit</artifactId >
341+ <scope >test</scope >
342+ </dependency >
343+ ```
344+
345+ ---
346+
285347## 📖 Examples
286348
287349The ` aether-datafixers-examples ` module provides a complete, runnable example demonstrating real-world usage patterns.
@@ -339,21 +401,38 @@ mvn test
339401## 🗺️ Roadmap
340402
341403- ** v0.1.0** (current)
342- - Core API and default implementations
343- - Schema-based versioning with TypeRegistry
344- - DataFix forward patching system
345- - Dynamic/DynamicOps format abstraction
346- - Basic codec infrastructure
347-
348- - ** v0.2.0**
349- - Additional codec implementations
350- - Extended type rewrite rules
351- - Performance optimizations
404+ - Core API and default implementations
405+ - Schema-based versioning with TypeRegistry
406+ - DataFix forward patching system
407+ - Dynamic/DynamicOps format abstraction
408+ - Basic codec infrastructure
409+
410+ - ** v0.2.0** (next)
411+ - ** Testkit module** — Fluent test data builders, custom AssertJ assertions, test harnesses
412+ - ** Migration diagnostics** — Optional structured report (applied fixes, touched types, timing)
413+ - ** Policy system** — Configurable handling for warnings/logs/unknown fields/types during migration
414+ - ** Codec improvements** — Better error reporting, parity improvements for GsonOps/JacksonOps
415+ - ** Extended rewrite rules** — Common operations like nested rename/move/copy helpers
416+ - Performance optimizations
417+
418+ - ** v0.3.0**
419+ - ** CLI module** — Migrate files and print/export a migration report (batch-friendly)
420+ - ** Schema tooling** — Runtime schema validation + diff utilities between versions
421+
422+ - ** v0.4.0**
423+ - ** Extra ops modules** — Optional YAML/TOML support (format adapters)
424+ - ** Debug utilities** — Pretty printers / tree diff for Dynamic structures (dev-facing)
425+
426+ - ** v0.5.0** (API freeze candidate)
427+ - ** API stabilization pass** — Naming/packaging cleanup + deprecations completed
428+ - ** Compatibility checks in CI** — Binary/source compatibility guardrails for public API
429+ - ** Hardened error model** — Consistent exception types + structured error details
430+ - ** Release readiness** — Final review of docs/examples against frozen API
352431
353432- ** v1.0.0**
354- - Stable API surface
355- - Comprehensive documentation
356- - Production-ready release
433+ - Stable API surface
434+ - Comprehensive documentation
435+ - Production-ready release
357436
358437---
359438
0 commit comments