π Language: π©πͺ German β

|
|
 |
GSF-NexFact-Assets A dedicated central test asset repository for the GSF-NexFact e-invoicing ecosystem. |
GSF stands for Go Small Frameworks β minimalist tools for robust applications.
Repository
This project is developed and maintained on Codeberg.
Canonical repository:
https://codeberg.org/tiny-frameworks/nexfact-assets
GitHub is an automated mirror of the Codeberg repository:
GitHub mirror:
https://github.com/tiny-frameworks/nexfact-assets
GSF-NexFact-Assets
GSF-nexfact-assets is the dedicated central test asset repository for the GSF-nexfact e-invoicing
ecosystem. It stores shared test environments (env), reference resources (schemas, templates, mock
profiles), and sample invoice files used across nexfact, nexfact-server, and related microservices.
By isolating heavy binary test fixtures into this repository, core source
repositories (nexfact, nexfact-server, nexutils) remain lightweight and fast to clone.
This project is part of the tiny-frameworks initiative.
Directory Structure
nexfact-assets/
βββ setup.go # Creates isolated working directory & free dynamic ports
βββ env/ # Reference nexfact environment templates & schemas
βββ testdata/
βββ resources/ # Test input files (PDFs, XMLs, JSON payloads, images)
βββ test_generate_fx.json
βββ test_combine_invoice.pdf
βββ test_combine_invoice.xml
βββ test_attachment.png
Test Execution & Isolation Pattern
To guarantee that tests remain strictly deterministic and side-effect-free, tests must
never write directly to this asset repository.
Instead, tests follow the TempDir Isolation Pattern:
βββββββββββββββββββββββββββββ
β nexfact-assets β (Read-Only Master Templates & Fixtures)
βββββββββββββββ¬ββββββββββββββ
β 1. Copy on Test Startup
βΌ
βββββββββββββββββββββββββββββ
β tempDir β (Isolated Temporary Working Directory)
β βββ env/ β
β βββ resources/ β
βββββββββββββββ¬ββββββββββββββ
β 2. Process, Write Output & Assert
βΌ
βββββββββββββββββββββββββββββ
β os.RemoveAll() β (Manual/Deferred Cleanup by Caller)
βββββββββββββββββββββββββββββ
Usage in Tests
import "codeberg.org/tiny-frameworks/nexfact-assets"
func TestMyServer(t *testing.T) {
setupMap, err := assets.SetupTestEnv("native")
if err != nil {
t.Fatalf("failed to create testSetup: %v", err)
}
envRoot := setupMap["envRoot"]
resourcePath := setupMap["resourcePath"]
tempDir := setupMap["tempDir"]
defer os.RemoveAll(tempDir)
// ... execute tests ...
}
Local Development
This repository is designed to be used alongside related tiny-frameworks modules (nexfact, nexfact-server, nexutils).
For local development, place the repositories side-by-side in a shared workspace directory.
Organization & Standards
- Copyright: Β© 2026 Georg Hagn.
- Repository:
codeberg.org/tiny-frameworks/nexfact-assets
- License: Apache License, Version 2.0.
GSF-NexFact-Assets is an independent open-source project and is not affiliated with any corporation of a similar name.
For inquiries, architectural discussions, or security issues, please contact:
π§ georghagn [at] tiny-frameworks.io