本文整理汇总了Java中com.jayway.restassured.module.mockmvc.RestAssuredMockMvc.standaloneSetup方法的典型用法代码示例。如果您正苦于以下问题:Java RestAssuredMockMvc.standaloneSetup方法的具体用法?Java RestAssuredMockMvc.standaloneSetup怎么用?Java RestAssuredMockMvc.standaloneSetup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jayway.restassured.module.mockmvc.RestAssuredMockMvc
的用法示例。
在下文中一共展示了RestAssuredMockMvc.standaloneSetup方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setup
import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void setup() throws Exception {
File tempFile = File.createTempFile("junit-healthchecks", "");
tempFile.delete();
healthCheckRepository = new JsonBackedHealthCheckRepositoryImpl(
tempFile,
new ObjectMapper()
);
RestAssuredMockMvc.standaloneSetup(
new HealthChecksController(healthCheckRepository)
);
}
示例2: before
import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void before() {
Mockito.when(this.customerRepository.findAll())
.thenReturn(Arrays.asList(
new Customer(1L, "first1", "last1", "[email protected]"),
new Customer(2L, "first2", "last2", "[email protected]")));
Mockito.when(this.customerRepository.findOne(Mockito.anyLong())).thenAnswer(invocation -> {
Object id = invocation.getArguments()[0];
return new Customer(Long.class.cast(id), "first", "last", "[email protected]");
});
RestAssuredMockMvc.standaloneSetup(this.customerRestController);
}
示例3: before
import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void before() {
RestAssuredMockMvc.standaloneSetup(this.customerRestController);
Mockito.when(this.customerRepository.findOne(1L))
.thenReturn(new Customer(1L, "first", "last", "email"));
}
示例4: setup
import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void setup() {
mockMvcBuilder = standaloneSetup(new FooController(mock(EntityLinks.class)));
DefaultFormattingConversionService service = new DefaultFormattingConversionService();
service.addConverter(new StringToUuidConverter());
mockMvcBuilder.setMessageConverters(jackson2HttpMessageConverter()).setConversionService(service);
RestAssuredMockMvc.standaloneSetup(mockMvcBuilder);
}
示例5: before
import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void before() {
RestAssuredMockMvc.standaloneSetup(this.customerRestController);
}
示例6: setUp
import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
RestAssuredMockMvc.standaloneSetup(userController);
}
示例7: setUp
import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void setUp() {
RestAssuredMockMvc.standaloneSetup(new ProductController());
}
开发者ID:nt-ca-aqe,项目名称:blog-contract-testing-with-spring-cloud-contract,代码行数:5,代码来源:ContractVerifierBaseTest.java
示例8: setup
import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void setup() throws UserNotFoundException {
RestAssuredMockMvc.standaloneSetup(new EditUserApiController(), new AuthUserApiController());
}
示例9: setup
import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void setup() {
RestAssuredMockMvc.standaloneSetup(new IssuesController(issuesService()));
}
示例10: setup
import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void setup() {
RestAssuredMockMvc.standaloneSetup(new GreetingController());
}
示例11: setup
import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void setup() {
RestAssuredMockMvc.standaloneSetup(new FraudDetectionController());
}