本文整理汇总了Java中io.vertx.ext.unit.TestContext.assertNotNull方法的典型用法代码示例。如果您正苦于以下问题:Java TestContext.assertNotNull方法的具体用法?Java TestContext.assertNotNull怎么用?Java TestContext.assertNotNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io.vertx.ext.unit.TestContext
的用法示例。
在下文中一共展示了TestContext.assertNotNull方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSwaggerRoute
import io.vertx.ext.unit.TestContext; //导入方法依赖的package包/类
@Test
public void testSwaggerRoute(final TestContext context) {
final Router router = Router.router(rule.vertx());
final SwaggerHandler handler = SwaggerHandler.registerToRouter(router, MyApp.class);
context.assertNotNull(handler.getSwagger());
final RoutingContext routingContext = mock(RoutingContext.class);
when(routingContext.currentRoute()).thenReturn(router.get("/api"));
when(routingContext.request()).thenReturn(mock(HttpServerRequest.class));
final HttpServerResponse response = mock(HttpServerResponse.class);
when(response.putHeader(any(CharSequence.class), any(CharSequence.class))).thenReturn(response);
when(routingContext.response()).thenReturn(response);
handler.handle(routingContext);
verify(response, times(1)).end(any(Buffer.class));
}
示例2: testSomething
import io.vertx.ext.unit.TestContext; //导入方法依赖的package包/类
/**
* A simple vert.x test to show an example
*
* @param context
* test context.
*/
@Test
public void testSomething(final TestContext context) {
context.assertFalse(false);
context.assertNotNull(rule.vertx());
}
示例3: testScan
import io.vertx.ext.unit.TestContext; //导入方法依赖的package包/类
@Test
public void testScan(final TestContext context) {
final Set<Class<?>> clazzes = Pack.getClasses(null);
for (final Class<?> clazz : clazzes) {
// System.out.println(clazz);
System.out.println(clazz.getName());
}
context.assertNotNull(clazzes);
}
示例4: testJson
import io.vertx.ext.unit.TestContext; //导入方法依赖的package包/类
@Test
public void testJson(final TestContext context) {
final JsonObject data = IO.getJObject(getFile("json-obj.json"));
final JsonObject processed = Vertical.to(data, Apeak.create("_id", "key"));
System.out.println(processed.encode());
context.assertNotNull(processed);
}
示例5: testArray
import io.vertx.ext.unit.TestContext; //导入方法依赖的package包/类
@Test
public void testArray(final TestContext context) {
final JsonArray data = IO.getJArray(getFile("json-arr.json"));
final JsonArray processed = Vertical.to(data, Apeak.create("_id", "key"));
System.out.println(processed.encode());
context.assertNotNull(processed);
}
示例6: testNull
import io.vertx.ext.unit.TestContext; //导入方法依赖的package包/类
@Test
public void testNull(final TestContext context) {
final JsonObject data = IO.getJObject(getFile("topic.json"));
final JsonObject processed = Vertical.to(data, Apeak.create("_id", "key"));
System.out.println(processed.encode());
context.assertNotNull(processed);
}
示例7: testScan
import io.vertx.ext.unit.TestContext; //导入方法依赖的package包/类
@Test
public void testScan(final TestContext context) {
final Set<Class<?>> clazzes = Pack.getClasses(null);
for (final Class<?> clazz : clazzes) {
// System.out.println(clazz);
}
context.assertNotNull(clazzes);
}
示例8: testAnno
import io.vertx.ext.unit.TestContext; //导入方法依赖的package包/类
public void testAnno(final TestContext context) {
context.assertNotNull(AGENTS);
}
示例9: testvJson
import io.vertx.ext.unit.TestContext; //导入方法依赖的package包/类
@Test
public void testvJson(final TestContext context) {
final JsonObject data = IO.getJObject(this.getFile("jackson-testInt.json"));
final JsonObject hitted = Jackson.visitJObject(data, "lang", "home", "email");
context.assertNotNull(hitted);
}
示例10: testIp
import io.vertx.ext.unit.TestContext; //导入方法依赖的package包/类
@Test
public void testIp(final TestContext context) {
final String ip = Net.getIP();
getLogger().info("[ ZERO TK ] Ip Address = {0}.", ip);
context.assertNotNull(ip);
}
示例11: testIpV4
import io.vertx.ext.unit.TestContext; //导入方法依赖的package包/类
@Test
public void testIpV4(final TestContext context) {
final String ip = Net.getIPv4();
getLogger().info("[ ZERO TK ] Ip v4 Address = {0}.", ip);
context.assertNotNull(ip);
}
示例12: testIpV6
import io.vertx.ext.unit.TestContext; //导入方法依赖的package包/类
@Test
public void testIpV6(final TestContext context) {
final String ip = Net.getIPv6();
getLogger().info("[ ZERO TK ] Ip v6 Address = {0}.", ip);
context.assertNotNull(ip);
}
示例13: testProp
import io.vertx.ext.unit.TestContext; //导入方法依赖的package包/类
@Test
public void testProp(final TestContext context) {
context.assertNotNull(IO.getProp(getFile("in.properties")));
}
示例14: testYaml
import io.vertx.ext.unit.TestContext; //导入方法依赖的package包/类
@Test
public void testYaml(final TestContext context) {
context.assertNotNull(IO.getYaml(getFile("test.yaml")));
}
示例15: testRead
import io.vertx.ext.unit.TestContext; //导入方法依赖的package包/类
@Test(expected = EmptyStreamException.class)
public void testRead(final TestContext context) {
context.assertNotNull(Stream.read(getFile("ini.txt")));
}