Skip to content

Commit

Permalink
Update TestUserService.java
Browse files Browse the repository at this point in the history
  • Loading branch information
DucBaoUIT committed Oct 8, 2024
1 parent 87ea9a8 commit d355de1
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/test/java/TestUserService.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@SpringBootTest(classes = com.programming.userService.StreamingApplication.class)
@AutoConfigureMockMvc
public class TestUserService {
@Autowired
private MockMvc mockMvc;
// import org.junit.jupiter.api.Test;
// import org.springframework.beans.factory.annotation.Autowired;
// import org.springframework.test.web.servlet.MockMvc;
// import org.springframework.boot.test.context.SpringBootTest;
// import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
// import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
// import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
// @SpringBootTest(classes = com.programming.userService.StreamingApplication.class)
// @AutoConfigureMockMvc
// public class TestUserService {
// @Autowired
// private MockMvc mockMvc;

@Test
public void testGetServiceName() throws Exception {
mockMvc.perform(get("/user/"))
.andExpect(status().isOk());
}
}
// @Test
// public void testGetServiceName() throws Exception {
// mockMvc.perform(get("/user/"))
// .andExpect(status().isOk());
// }
// }

0 comments on commit d355de1

Please sign in to comment.