How ericksontest/rainfall_api_official works
Rainfall API is an acceptance-test suite for the Environment Agency rainfall service, not the service implementation itself. Its main workflow expresses a consumer request as a typed query, routes it through scenario bindings and a driver, and uses either a deterministic in-memory client or the live HTTP client to produce a typed response for assertions. The feature tree preserves coverage of reading selection, data quality, and live compatibility. The README documents the overall design; links for unsampled feature bindings and data selection are limited to that documentation.
Main entry points: DependencyRegistration.cs Scenario registration · ReadingQuerySteps.cs Reading query steps · RainfallApiClient.cs HTTP client · RainfallScenarioContext.cs Scenario state
Components 17
Business specifications
- Reading scenarios
Rainfall API/Features/Readings - Data quality
Rainfall API/Features/DataQuality - Live compatibility
Rainfall API/Features/Live
Scenario workflow
- Reading query steps
Rainfall API/StepDefinitions/ReadingQuerySteps.cs - Reading assertions
Rainfall API/StepDefinitions/ReadingAssertionSteps.cs - Station setup
Rainfall API/StepDefinitions/StationSteps.cs - Scenario state
Rainfall API/Context/RainfallScenarioContext.cs - Scenario registration
Rainfall API/Hooks/DependencyRegistration.cs - Rainfall driver
Rainfall API/Drivers/RainfallDriver.cs
Rainfall domain
- Queries and readings
Rainfall API/Domain - Scenario clock
Rainfall API/Support/SystemClock.cs
Service boundaries
- Client contract
Rainfall API/Clients/IRainfallApiClient.cs - HTTP client
Rainfall API/Clients/RainfallApiClient.cs - Service options
Rainfall API/Configuration/RainfallApiOptions.cs - In-memory client
Rainfall API/Support/TestData/InMemoryRainfallApiClient.cs
Other components
- Scenario consumer
- Environment Agency API
Connections 21
- Scenario consumer → Reading scenarios: executes scenarios
README.md - Scenario consumer → Data quality: executes scenarios
README.md - Scenario consumer → Live compatibility: opts into
README.md - Reading scenarios → Reading query steps: binds workflows
- Data quality → Reading assertions: checks semantics
- Live compatibility → Reading query steps: binds workflows
- Reading query steps → Scenario state: stores query
Rainfall API/StepDefinitions/ReadingQuerySteps.cs - Reading query steps → Rainfall driver: requests readings
Rainfall API/StepDefinitions/ReadingQuerySteps.cs - Rainfall driver → Client contract: delegates request
Rainfall API/Drivers/RainfallDriver.cs - Reading assertions → Scenario state: reads response
Rainfall API/StepDefinitions/ReadingAssertionSteps.cs - Station setup → Scenario state: sets station
Rainfall API/StepDefinitions/StationSteps.cs - Reading query steps → Queries and readings: builds query
Rainfall API/StepDefinitions/ReadingQuerySteps.cs - Client contract → Queries and readings: uses request types
Rainfall API/Clients/IRainfallApiClient.cs - Scenario registration → Scenario state: registers state
Rainfall API/Hooks/DependencyRegistration.cs - Scenario registration → Rainfall driver: registers driver
Rainfall API/Hooks/DependencyRegistration.cs - Scenario registration → HTTP client: selects live client
Rainfall API/Hooks/DependencyRegistration.cs - Scenario registration → In-memory client: selects test client
Rainfall API/Hooks/DependencyRegistration.cs - HTTP client → Service options: configures base address
Rainfall API/Clients/RainfallApiClient.cs - HTTP client → Environment Agency API: requests readings
Rainfall API/Clients/RainfallApiClient.cs - HTTP client → Queries and readings: maps JSON response
Rainfall API/Clients/RainfallApiClient.cs - Scenario registration → Scenario clock: registers clock
Rainfall API/Hooks/DependencyRegistration.cs