docs: align issuance workflow test order

agent/payment-training-progress
chenyuan 4 weeks ago
parent 6fa34a74f1
commit 430eb528b6

@ -364,7 +364,7 @@ git commit -m "feat: add issuance application workflow"
- Consumes: application service methods and current authenticated JWT subject.
- Produces: the ten REST paths specified in the approved design, wrapped in `ApiResponse<T>`.
- [ ] **Step 1: Write failing MVC and OpenAPI documentation tests**
- [ ] **Step 1: Write failing MVC, end-to-end workflow, and OpenAPI documentation tests**
```java
@Test
@ -384,13 +384,23 @@ void apiDocsContainChineseCommercialAndCentralBankTags() throws Exception {
.andExpect(content().string(containsString("数字货币发行模块 - 商业银行端")))
.andExpect(content().string(containsString("数字货币发行模块 - 中央银行端")));
}
@Test
void completeTeachingWorkflowReturnsReceivedPayloadToCentralBankEnd() throws Exception {
UUID requestId = createPrepareDigestSignPackageAndSendThroughCommercialBankApi();
mockMvc.perform(get("/api/v1/central-banks/issuance/requests/{id}", requestId)
.with(jwt().jwt(jwt -> jwt.subject("tzs001"))))
.andExpect(status().isOk())
.andExpect(jsonPath("$.data.receiveStatus").value("RECEIVED"))
.andExpect(jsonPath("$.data.payload.requestId").exists());
}
```
- [ ] **Step 2: Run controller tests to verify they fail**
Run: `mvn -Dtest=CommercialBankIssuanceControllerTest,CentralBankIssuanceControllerTest test -B`
Expected: compilation fails because the controllers and DTOs do not exist.
Expected: compilation fails because the controllers, DTOs, and commercial-bank-to-central-bank HTTP workflow do not exist.
- [ ] **Step 3: Implement controllers, DTO validation, and Chinese Swagger metadata**
@ -419,7 +429,7 @@ git add src/main/java/com/yau/digitalrmb/issuance/interfaces src/main/java/com/y
git commit -m "feat: expose commercial and central issuance APIs"
```
## Task 6: Verify the Full Workflow on the Dev Database
## Task 6: Verify the Completed Workflow on the Dev Database
**Files:**
- Modify: `README.md`
@ -429,31 +439,11 @@ git commit -m "feat: expose commercial and central issuance APIs"
- Consumes: completed application JAR and `dev` profile.
- Produces: documented startup and verified commercial-bank-to-central-bank workflow.
- [ ] **Step 1: Write a failing integration workflow test**
```java
@Test
void completeTeachingWorkflowReturnsReceivedPayloadToCentralBankEnd() throws Exception {
UUID requestId = createPrepareDigestSignPackageAndSendThroughCommercialBankApi();
mockMvc.perform(get("/api/v1/central-banks/issuance/requests/{id}", requestId)
.with(jwt().jwt(jwt -> jwt.subject("tzs001"))))
.andExpect(status().isOk())
.andExpect(jsonPath("$.data.receiveStatus").value("RECEIVED"))
.andExpect(jsonPath("$.data.payload.requestId").exists());
}
```
- [ ] **Step 2: Run the full workflow test to verify it fails before the missing integration behavior is completed**
Run: `mvn -Dtest=IssuanceWorkflowIntegrationTest test -B`
Expected: FAIL until all commercial-bank action endpoints and the central-bank projection are connected.
- [ ] **Step 3: Add only the missing integration wiring and document the dev workflow**
- [ ] **Step 1: Add the dev workflow documentation**
Add a README section with the `dev` profile startup command, the Chinese Swagger URL, the commercial-bank inventory endpoint, and the central-bank request query endpoint. Do not document or expose any database password or private key.
- [ ] **Step 4: Run all automated verification**
- [ ] **Step 2: Run all automated verification**
Run:
@ -466,7 +456,7 @@ mvn package -DskipTests -B
Expected: Maven exits 0 with all tests passing and the JAR built for Java 8.
- [ ] **Step 5: Run the dev-profile smoke test against the 118 test database**
- [ ] **Step 3: Run the dev-profile smoke test against the 118 test database**
Run:
@ -479,7 +469,7 @@ Invoke-WebRequest http://localhost:8081/v3/api-docs -UseBasicParsing
Expected: health status is `UP`, Swagger returns HTTP 200, and OpenAPI JSON contains both readable Chinese tag names without replacement characters.
- [ ] **Step 6: Commit verification and documentation**
- [ ] **Step 4: Commit verification and documentation**
```bash
git add README.md src/test/java/com/yau/digitalrmb/issuance/interfaces/rest/IssuanceWorkflowIntegrationTest.java

Loading…
Cancel
Save