Reference documentation shows the same MockMvcTester example twice in "Auto-configured Spring REST Docs Tests With Mock MVC"
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 86/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- java, spring-boot
- Ambito
- documentation
Direzione di ricerca
Leggi la sezione Spring REST Docs e confronta i due file di esempio elencati nell’issue. Aggiorna l’esempio hamcrest e l’esempio che include in modo che usi MockMvc con perform, andExpect e andDo(document(...)), come descritto nell’issue. Verifica che gli esempi Hamcrest e AssertJ differiscano come promesso dal testo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In the section Auto-configured Spring REST Docs Tests With Mock MVC (4.1.2), the text introduces a MockMvc example, then says "If you prefer to use the AssertJ integration, MockMvcTester is available as well, as shown in the following example" — but both code blocks are the same MockMvcTester example.
The two included sample files are identical except for their package (tag v4.1.2):
documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/hamcrest/MyUserDocumentationTests.javadocumentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/assertj/MyUserDocumentationTests.java
The hamcrest variant seems to have been overwritten with the AssertJ one when the two variants were introduced; the same duplication is present in v3.5.6 and v3.4.10. Before the split, the example used MockMvc (tag v3.3.5):
@Autowired
private MockMvc mvc;
@Test
void listUsers() throws Exception {
this.mvc.perform(get("/users").accept(MediaType.TEXT_PLAIN))
.andExpect(status().isOk())
.andDo(document("list-users"));
}
Expected: the first example uses MockMvc with perform(...) / andExpect(...) / andDo(document(...)), so that the two examples actually differ as the text says.
- Lingua principale
- Java
- Stelle
- 81.8k
- Fork
- 43.5k
- Merge medio
- 3g 13h
- PR unite (30g)
- 90
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di spring-projects/spring-boot
-
status: waiting-for-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
spring-projects/spring-boot#52647 ·
I maintainer di solito rispondono entro 2 giorni
-
JavaLoggingSystem.getLoggerConfiguration does not map ROOT and creates unknown loggers on lookupApertastatus: waiting-for-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
spring-projects/spring-boot#52646 ·
I maintainer di solito rispondono entro 2 giorni
-
Maven process-test-aot only copies META-INF/native-image of the generated resources so the Logback configuration is lost in native testsForse già presa @tchowdhury101 l’ha presa 4 giorni fa. Apertatype: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
spring-projects/spring-boot#52301 · 4 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
for: team-meeting status: waiting-for-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
spring-projects/spring-boot#52295 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
-
Add a How-To to explain how to configure logging of AOT processingForse di nuovo libera @dana-stc l’ha presa 30 giorni fa e non c’è nessuna pull request aperta. Apertastatus: team-only type: documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
spring-projects/spring-boot#52092 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di spring-projects/spring-boot
Issue simili
-
hermes-queue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
chrisalunlloyd2-sudo/mindpalace#349 ·
I maintainer di solito rispondono entro 1 giorno
-
Retry-After parser accepts invalid delay-seconds valuesForse già presa @Dhruvraj-Rana l’ha presa oggi. ApertaBug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
open-telemetry/opentelemetry-java#9018 ·
I maintainer di solito rispondono entro 2 giorni
-
bug priority: medium Review effort [1-5]: 2 status: needs-triage type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
carlos-emr/carlos#5818 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue help wanted tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
appmonster007/kmip-adapter#100 ·
-
accepted good first issue java
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno