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


Java TestRunner.assertNotValid方法代码示例

本文整理汇总了Java中org.apache.nifi.util.TestRunner.assertNotValid方法的典型用法代码示例。如果您正苦于以下问题:Java TestRunner.assertNotValid方法的具体用法?Java TestRunner.assertNotValid怎么用?Java TestRunner.assertNotValid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.nifi.util.TestRunner的用法示例。


在下文中一共展示了TestRunner.assertNotValid方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: validateNotValidForNonExistingLibPath

import org.apache.nifi.util.TestRunner; //导入方法依赖的package包/类
@Test
public void validateNotValidForNonExistingLibPath() throws Exception {
    TestRunner runner = TestRunners.newTestRunner(mock(Processor.class));
    JMSConnectionFactoryProvider cfProvider = new JMSConnectionFactoryProvider();
    runner.addControllerService("cfProvider", cfProvider);
    runner.setProperty(cfProvider, JMSConnectionFactoryProvider.BROKER_URI, "myhost:1234");

    runner.setProperty(cfProvider, JMSConnectionFactoryProvider.CLIENT_LIB_DIR_PATH, "foo");
    runner.setProperty(cfProvider, JMSConnectionFactoryProvider.CONNECTION_FACTORY_IMPL,
            "org.apache.nifi.jms.testcflib.TestConnectionFactory");
    runner.assertNotValid(cfProvider);
}
 
开发者ID:lsac,项目名称:nifi-jms-jndi,代码行数:13,代码来源:JMSConnectionFactoryProviderTest.java

示例2: validateFailsIfURINotHostPortAndNotActiveMQ

import org.apache.nifi.util.TestRunner; //导入方法依赖的package包/类
@Test(expected = AssertionError.class)
public void validateFailsIfURINotHostPortAndNotActiveMQ() throws Exception {
    TestRunner runner = TestRunners.newTestRunner(mock(Processor.class));
    JMSConnectionFactoryProvider cfProvider = new JMSConnectionFactoryProvider();
    runner.addControllerService("cfProvider", cfProvider);
    runner.setProperty(cfProvider, JMSConnectionFactoryProvider.BROKER_URI, "myhost");

    runner.setProperty(cfProvider, JMSConnectionFactoryProvider.CLIENT_LIB_DIR_PATH, "test-lib");
    runner.setProperty(cfProvider, JMSConnectionFactoryProvider.CONNECTION_FACTORY_IMPL,
            "org.apache.nifi.jms.testcflib.TestConnectionFactory");
    runner.enableControllerService(cfProvider);
    runner.assertNotValid(cfProvider);
}
 
开发者ID:lsac,项目名称:nifi-jms-jndi,代码行数:14,代码来源:JMSConnectionFactoryProviderTest.java

示例3: validateNotValidForNonDirectoryPath

import org.apache.nifi.util.TestRunner; //导入方法依赖的package包/类
@Test
public void validateNotValidForNonDirectoryPath() throws Exception {
    TestRunner runner = TestRunners.newTestRunner(mock(Processor.class));
    JMSConnectionFactoryProvider cfProvider = new JMSConnectionFactoryProvider();
    runner.addControllerService("cfProvider", cfProvider);
    runner.setProperty(cfProvider, JMSConnectionFactoryProvider.BROKER_URI, "myhost:1234");

    runner.setProperty(cfProvider, JMSConnectionFactoryProvider.CLIENT_LIB_DIR_PATH, "pom.xml");
    runner.setProperty(cfProvider, JMSConnectionFactoryProvider.CONNECTION_FACTORY_IMPL,
            "org.apache.nifi.jms.testcflib.TestConnectionFactory");
    runner.assertNotValid(cfProvider);
}
 
开发者ID:lsac,项目名称:nifi-jms-jndi,代码行数:13,代码来源:JMSConnectionFactoryProviderTest.java

示例4: validateNotValidForNonExistingLibPath

import org.apache.nifi.util.TestRunner; //导入方法依赖的package包/类
@Test
public void validateNotValidForNonExistingLibPath() throws Exception {
    TestRunner runner = TestRunners.newTestRunner(mock(Processor.class));
    JNDIConnectionFactoryProvider cfProvider = new JNDIConnectionFactoryProvider();
    runner.addControllerService("cfProvider", cfProvider);
    runner.setProperty(cfProvider, JNDIConnectionFactoryProvider.BROKER_URI, "myhost:1234");
    runner.setProperty(cfProvider, JNDIConnectionFactoryProvider.JNDI_CF_LOOKUP, "ConnectonFactory");

    runner.setProperty(cfProvider, JNDIConnectionFactoryProvider.CLIENT_LIB_DIR_PATH, "foo");
    runner.setProperty(cfProvider, JNDIConnectionFactoryProvider.CONNECTION_FACTORY_IMPL,
            "org.apache.nifi.jms.testcflib.TestConnectionFactory");
    runner.assertNotValid(cfProvider);
}
 
开发者ID:lsac,项目名称:nifi-jms-jndi,代码行数:14,代码来源:JNDIConnectionFactoryProviderTest.java

示例5: validateFailsIfURICfAndNotSolace

import org.apache.nifi.util.TestRunner; //导入方法依赖的package包/类
@Test(expected = AssertionError.class)
public void validateFailsIfURICfAndNotSolace() throws Exception {
    TestRunner runner = TestRunners.newTestRunner(mock(Processor.class));
    JNDIConnectionFactoryProvider cfProvider = new JNDIConnectionFactoryProvider();
    runner.addControllerService("cfProvider", cfProvider);
    runner.setProperty(cfProvider, JNDIConnectionFactoryProvider.BROKER_URI, "myhost:1234");
    runner.setProperty(cfProvider, JNDIConnectionFactoryProvider.JNDI_CF_LOOKUP, "ConnectonFactory");

    runner.setProperty(cfProvider, JNDIConnectionFactoryProvider.CLIENT_LIB_DIR_PATH, "test-lib");
    runner.setProperty(cfProvider, JNDIConnectionFactoryProvider.CONNECTION_FACTORY_IMPL,
            "org.apache.nifi.jms.testcflib.TestConnectionFactory");
    runner.enableControllerService(cfProvider);
    runner.assertNotValid(cfProvider);
}
 
开发者ID:lsac,项目名称:nifi-jms-jndi,代码行数:15,代码来源:JNDIConnectionFactoryProviderTest.java

示例6: validateNotValidForNonDirectoryPath

import org.apache.nifi.util.TestRunner; //导入方法依赖的package包/类
@Test
public void validateNotValidForNonDirectoryPath() throws Exception {
    TestRunner runner = TestRunners.newTestRunner(mock(Processor.class));
    JNDIConnectionFactoryProvider cfProvider = new JNDIConnectionFactoryProvider();
    runner.addControllerService("cfProvider", cfProvider);
    runner.setProperty(cfProvider, JNDIConnectionFactoryProvider.BROKER_URI, "myhost:1234");
    runner.setProperty(cfProvider, JNDIConnectionFactoryProvider.JNDI_CF_LOOKUP, "ConnectonFactory");

    runner.setProperty(cfProvider, JNDIConnectionFactoryProvider.CLIENT_LIB_DIR_PATH, "pom.xml");
    runner.setProperty(cfProvider, JNDIConnectionFactoryProvider.CONNECTION_FACTORY_IMPL,
            "org.apache.nifi.jms.testcflib.TestConnectionFactory");
    runner.assertNotValid(cfProvider);
}
 
开发者ID:lsac,项目名称:nifi-jms-jndi,代码行数:14,代码来源:JNDIConnectionFactoryProviderTest.java

示例7: testInvalid

import org.apache.nifi.util.TestRunner; //导入方法依赖的package包/类
@Test
public void testInvalid() {
    TestRunner runner = TestRunners.newTestRunner(DelayProcessor.class);
    runner.setValidateExpressionUsage(false);
    runner.setProperty(DelayProcessor.TIME_PERIOD, "10 kb");

    runner.assertNotValid();
}
 
开发者ID:Asymmetrik,项目名称:nifi-nars,代码行数:9,代码来源:DelayProcessorTest.java

示例8: validating_incomplete_auth_inputs_4

import org.apache.nifi.util.TestRunner; //导入方法依赖的package包/类
@Test
public void validating_incomplete_auth_inputs_4() throws InitializationException {
    final TestRunner runner = TestRunners.newTestRunner(TestProcessor.class);
    final StandardMongoClientService service = new StandardMongoClientService();

    Map<String, String> props = new HashMap<>();
    props.put(StandardMongoClientService.HOSTS.getName(), "localhost:27017");
    props.put(StandardMongoClientService.USERNAME.getName(), "mongouser");
    props.put(StandardMongoClientService.PASSWORD.getName(), "mongouser");
    runner.addControllerService("test_hosts", service, props);
    runner.assertNotValid(service);
}
 
开发者ID:Asymmetrik,项目名称:nifi-nars,代码行数:13,代码来源:StandardMongoClientServiceIT.java

示例9: createSimpleIndexBadTest2

import org.apache.nifi.util.TestRunner; //导入方法依赖的package包/类
@Test
public void createSimpleIndexBadTest2() throws Exception {
    final TestRunner runner = TestRunners.newTestRunner(new StoreInMongo());
    addMongoService(runner);
    runner.setProperty(MongoProps.DATABASE, MONGO_DATABASE_NAME);
    runner.setProperty(MongoProps.COLLECTION, "index_test");
    runner.setProperty(MongoProps.INDEX, "{\"a\": 1}");

    runner.assertNotValid();
}
 
开发者ID:Asymmetrik,项目名称:nifi-nars,代码行数:11,代码来源:StoreInMongoIT.java

示例10: validating_incomplete_auth_inputs_1

import org.apache.nifi.util.TestRunner; //导入方法依赖的package包/类
@Test
public void validating_incomplete_auth_inputs_1() throws InitializationException {
    final TestRunner runner = TestRunners.newTestRunner(TestProcessor.class);
    final StandardMongoClientService service = new StandardMongoClientService();

    Map<String, String> props = new HashMap<>();
    props.put(StandardMongoClientService.HOSTS.getName(), "localhost:27017");
    props.put(StandardMongoClientService.USERNAME.getName(), "mongouser");
    runner.addControllerService("test_hosts", service, props);
    runner.assertNotValid(service);
}
 
开发者ID:Asymmetrik,项目名称:nifi-nars,代码行数:12,代码来源:StandardMongoClientServiceIT.java

示例11: validating_incomplete_auth_inputs_2

import org.apache.nifi.util.TestRunner; //导入方法依赖的package包/类
@Test
public void validating_incomplete_auth_inputs_2() throws InitializationException {
    final TestRunner runner = TestRunners.newTestRunner(TestProcessor.class);
    final StandardMongoClientService service = new StandardMongoClientService();

    Map<String, String> props = new HashMap<>();
    props.put(StandardMongoClientService.HOSTS.getName(), "localhost:27017");
    props.put(StandardMongoClientService.PASSWORD.getName(), "mongouser");
    runner.addControllerService("test_hosts", service, props);
    runner.assertNotValid(service);
}
 
开发者ID:Asymmetrik,项目名称:nifi-nars,代码行数:12,代码来源:StandardMongoClientServiceIT.java

示例12: validating_incomplete_auth_inputs_5

import org.apache.nifi.util.TestRunner; //导入方法依赖的package包/类
@Test
public void validating_incomplete_auth_inputs_5() throws InitializationException {
    final TestRunner runner = TestRunners.newTestRunner(TestProcessor.class);
    final StandardMongoClientService service = new StandardMongoClientService();

    Map<String, String> props = new HashMap<>();
    props.put(StandardMongoClientService.HOSTS.getName(), "localhost:27017");
    props.put(StandardMongoClientService.USERNAME.getName(), "mongouser");
    props.put(StandardMongoClientService.AUTH_DATABASE.getName(), "mongouser");
    runner.addControllerService("test_hosts", service, props);
    runner.assertNotValid(service);
}
 
开发者ID:Asymmetrik,项目名称:nifi-nars,代码行数:13,代码来源:StandardMongoClientServiceIT.java

示例13: testInvalidConfig

import org.apache.nifi.util.TestRunner; //导入方法依赖的package包/类
@Test
public void testInvalidConfig() {
    TestRunner runner = TestRunners.newTestRunner(new GenerateTimeSeriesFlowFile());
    runner.setProperty(GenerateTimeSeriesFlowFile.SIMULATOR_CONFIG, "/my/invalid/path");
    runner.assertNotValid();
}
 
开发者ID:hashmapinc,项目名称:nifi-simulator-bundle,代码行数:7,代码来源:GenerateTimeSeriesFlowfileTest.java

示例14: testMissingAttributeName

import org.apache.nifi.util.TestRunner; //导入方法依赖的package包/类
@Test
public void testMissingAttributeName() {
    TestRunner runner = TestRunners.newTestRunner(CalculateLatencyStatistics.class);
    runner.assertNotValid();
}
 
开发者ID:Asymmetrik,项目名称:nifi-nars,代码行数:6,代码来源:CalculateLatencyStatisticsTest.java


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