Skip to content

Commit d61ae7a

Browse files
committed
Refactor method names
1 parent 2ab336b commit d61ae7a

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/test/java/og_spipes/rest/ExecutionControllerTest.java

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,29 +68,27 @@ public void init() throws Exception {
6868
}
6969

7070
@Test
71-
@DisplayName("List history of execution")
72-
public void testScriptsEndpoint() throws Exception {
71+
public void historyOfAllExecutionReturnsJson() throws Exception {
7372
this.mockMvc.perform(get("/execution/history"))
7473
.andDo(print())
7574
.andExpect(status().isOk())
7675
.andExpect(jsonPath("$").exists());
7776
}
7877

7978
@Test
80-
@DisplayName("Get file moduleTypes")
81-
public void testGetScriptModuleTypes() throws Exception {
79+
public void historyOfModuleReturnsSuccessfully() throws Exception {
8280
HashSet<ModuleExecutionInfo> executionInfos = Sets.newHashSet(
8381
new ModuleExecutionInfo("moduleUri", null, 100L, 122L, 123L)
8482
);
8583
Mockito.when(viewService.modulesExecutionInfo("http://example.com/transformationId")).thenReturn(executionInfos);
8684
this.mockMvc.perform(post("/execution/history-modules")
87-
.content(
88-
"{" +
89-
"\"@type\": \"http://onto.fel.cvut.cz/ontologies/s-pipes/script-dto\"," +
90-
"\"http://onto.fel.cvut.cz/ontologies/s-pipes/has-transformation-id\": \"http://example.com/transformationId\"" +
91-
"}"
92-
)
93-
.contentType(MediaType.APPLICATION_JSON))
85+
.content("""
86+
{
87+
"@type": "http://onto.fel.cvut.cz/ontologies/s-pipes/script-dto",
88+
"http://onto.fel.cvut.cz/ontologies/s-pipes/has-transformation-id": "http://example.com/transformationId"
89+
}
90+
""")
91+
.contentType(MediaType.APPLICATION_JSON))
9492
.andDo(print())
9593
.andExpect(status().isOk());
9694
}

0 commit comments

Comments
 (0)