当前位置: 首页>>代码示例>>Java>>正文


Java RestAssuredMockMvc.standaloneSetup方法代码示例

本文整理汇总了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)
    );
}
 
开发者ID:gilles-stragier,项目名称:quickmon,代码行数:15,代码来源:HealthChecksControllerIntegrationTest.java

示例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);
}
 
开发者ID:applied-continuous-delivery-livelessons,项目名称:cdct,代码行数:16,代码来源:CustomerBase.java

示例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"));

}
 
开发者ID:applied-continuous-delivery-livelessons,项目名称:cdct,代码行数:9,代码来源:BaseClass.java

示例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);
}
 
开发者ID:Devskiller,项目名称:friendly-id,代码行数:9,代码来源:MvcTest.java

示例5: before

import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void before() {
    RestAssuredMockMvc.standaloneSetup(this.customerRestController);
}
 
开发者ID:applied-continuous-delivery-livelessons,项目名称:cdct,代码行数:5,代码来源:CustomerBase.java

示例6: setUp

import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
    RestAssuredMockMvc.standaloneSetup(userController);
}
 
开发者ID:kchrusciel,项目名称:Spring-Boot-Examples,代码行数:5,代码来源:BaseClass.java

示例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());
}
 
开发者ID:daflockinger,项目名称:poppynotes,代码行数:5,代码来源:BaseContractTest.java

示例9: setup

import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void setup() {
	RestAssuredMockMvc.standaloneSetup(new IssuesController(issuesService()));
}
 
开发者ID:spring-cloud-samples,项目名称:github-analytics,代码行数:5,代码来源:BaseClass.java

示例10: setup

import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void setup() {
    RestAssuredMockMvc.standaloneSetup(new GreetingController());
}
 
开发者ID:Codearte,项目名称:accurest-maven-plugin,代码行数:5,代码来源:BaseAccurest.java

示例11: setup

import com.jayway.restassured.module.mockmvc.RestAssuredMockMvc; //导入方法依赖的package包/类
@Before
public void setup() {
	RestAssuredMockMvc.standaloneSetup(new FraudDetectionController());
}
 
开发者ID:Codearte,项目名称:accurest-maven-plugin,代码行数:5,代码来源:BaseAccurest.java


注:本文中的com.jayway.restassured.module.mockmvc.RestAssuredMockMvc.standaloneSetup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。