UPDATE 01-sep
This commit is contained in:
@@ -54,13 +54,16 @@ public class QuickReplyContentServiceTest {
|
||||
// Given
|
||||
String collectionId = "home";
|
||||
String header = "home_header";
|
||||
String body = "home_body";
|
||||
String button = "home_button";
|
||||
String headerSection = "home_header_section";
|
||||
List<Map<String, Object>> preguntas = Collections.singletonList(
|
||||
Map.of("titulo", "title", "descripcion", "description", "respuesta", "response")
|
||||
);
|
||||
List<QuestionDTO> questionDTOs = Collections.singletonList(
|
||||
new QuestionDTO("title", "description", "response")
|
||||
);
|
||||
QuickReplyDTO expected = new QuickReplyDTO(header, questionDTOs);
|
||||
QuickReplyDTO expected = new QuickReplyDTO(header, body, button, headerSection, questionDTOs);
|
||||
|
||||
when(firestore.collection("artifacts")).thenReturn(collectionReference);
|
||||
when(collectionReference.document("default-app-id")).thenReturn(documentReference);
|
||||
@@ -70,6 +73,9 @@ public class QuickReplyContentServiceTest {
|
||||
when(apiFuture.get()).thenReturn(documentSnapshot);
|
||||
when(documentSnapshot.exists()).thenReturn(true);
|
||||
when(documentSnapshot.getString("header")).thenReturn(header);
|
||||
when(documentSnapshot.getString("body")).thenReturn(body);
|
||||
when(documentSnapshot.getString("button")).thenReturn(button);
|
||||
when(documentSnapshot.getString("header_section")).thenReturn(headerSection);
|
||||
when(documentSnapshot.get("preguntas")).thenReturn(preguntas);
|
||||
|
||||
// When
|
||||
@@ -112,7 +118,7 @@ public class QuickReplyContentServiceTest {
|
||||
|
||||
// Then
|
||||
StepVerifier.create(result)
|
||||
.expectNext(new QuickReplyDTO("empty", Collections.emptyList()))
|
||||
.expectNext(new QuickReplyDTO("empty", null, null, null, Collections.emptyList()))
|
||||
.verifyComplete();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user