Add comprehensive TDD infrastructure with 45 tests
- Add lib crate exposing modules for integration testing - Add dev-dependencies: tokio-test 0.4, tempfile - Refactor parse_csv_fields() as pure function for unit testing - Add field validation (minimum 16 fields required) - Fix repository last_insert_id using SELECT LAST_INSERT_ID() - Add 10 lib tests for CSV parsing and date formatting - Add 10 config tests for environment configuration - Add 7 import tests for CSV file parsing - Add 6 models tests for database structs - Add 12 repository tests for CRUD operations
This commit is contained in:
12
Cargo.toml
12
Cargo.toml
@@ -3,6 +3,14 @@ name = "invoice-generator"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
name = "invoice_generator"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "invoice-generator"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
askama = "0.15.5"
|
||||
chrono = { version = "0.4.44", features = ["serde"] }
|
||||
@@ -13,3 +21,7 @@ tokio = { version = "1", features = ["full"] }
|
||||
toml = "0.8"
|
||||
anyhow = "1"
|
||||
bigdecimal = { version = "0.4", features = ["serde"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio-test = "0.4"
|
||||
tempfile = "3"
|
||||
|
||||
Reference in New Issue
Block a user