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


Java AfterSuite类代码示例

本文整理汇总了Java中org.jboss.arquillian.test.spi.event.suite.AfterSuite的典型用法代码示例。如果您正苦于以下问题:Java AfterSuite类的具体用法?Java AfterSuite怎么用?Java AfterSuite使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AfterSuite类属于org.jboss.arquillian.test.spi.event.suite包,在下文中一共展示了AfterSuite类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: stopNodesForSuite

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
/**
 * Removes nodes created on suite level and destroys provider listed in "arquillian.suite.destroy.providers" cloud property.
 */
public void stopNodesForSuite(@Observes AfterSuite event, ContainerRegistry registry, CloudsRegistry cloudsRegistry)
        throws LifecycleException {
    try {
        final Set<String> nodeNameSet = new HashSet<>();
        processSuiteLeveNodes(nodeProperties -> {
            LOGGER.debug("WildFly container {}  will be destroyed", nodeProperties.getName());
            nodeNameSet.add(nodeProperties.getName());
            if (nodeProperties.getPropertyAsBoolean(ArquillianConfig.Node.CONTAINER_REGISTER, false)) {
                try {
                    cloudsRegistry.stopWildFlyContainerInRegistry(nodeProperties.getName(), registry,
                            containerContext.get());
                } catch (Exception e) {
                    throw new RuntimeException("Stopping WildFly container failed", e);
                }
            }

        });
        cloudsRegistry.cleanupNodes(node -> nodeNameSet.contains(node.getName()));
    } finally {
        iterateSuiteCsvProperty(ArquillianConfig.Suite.DESTROY_PROVIDERS, cloudsRegistry::destroyProvider);
    }
}
 
开发者ID:wildfly-extras,项目名称:sunstone,代码行数:26,代码来源:SunstoneObserver.java

示例2: startBeforeSuiteTrueTest

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Test
public void startBeforeSuiteTrueTest() throws Exception {

    Mockito.when(configuration.getStartBeforeSuite()).thenReturn(true);

    fire(new VideoExtensionConfigured());

    fire(new BeforeSuite());
    fire(new BeforeClass(DummyTestCase.class));
    fire(new Before(DummyTestCase.class, DummyTestCase.class.getMethod("test")));

    bind(TestScoped.class, TestResult.class, TestResult.passed());

    fire(new After(DummyTestCase.class, DummyTestCase.class.getMethod("test")));
    fire(new AfterClass(DummyTestCase.class));
    fire(new AfterSuite());

    assertEventFired(BeforeVideoStart.class, 1);
    assertEventFired(StartRecordSuiteVideo.class, 1);
    assertEventFired(AfterVideoStart.class, 1);

    assertEventFired(BeforeVideoStop.class, 1);
    assertEventFired(StopRecordSuiteVideo.class, 1);
    assertEventFired(AfterVideoStop.class, 1);
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:26,代码来源:RecorderLifecycleObserverTestCase.java

示例3: startBeforeClassTrueTest

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Test
public void startBeforeClassTrueTest() throws Exception {

    Mockito.when(configuration.getStartBeforeClass()).thenReturn(true);

    fire(new VideoExtensionConfigured());

    fire(new BeforeSuite());
    fire(new BeforeClass(DummyTestCase.class));
    fire(new Before(DummyTestCase.class, DummyTestCase.class.getMethod("test")));

    bind(TestScoped.class, TestResult.class, TestResult.passed());

    fire(new AfterRules(DummyTestCase.class, DummyTestCase.class.getMethod("test"), LifecycleMethodExecutor.NO_OP));
    fire(new AfterClass(DummyTestCase.class));
    fire(new AfterSuite());

    assertEventFired(BeforeVideoStart.class, 1);
    assertEventFired(StartRecordClassVideo.class, 1);
    assertEventFired(AfterVideoStart.class, 1);

    assertEventFired(BeforeVideoStop.class, 1);
    assertEventFired(StopRecordClassVideo.class, 1);
    assertEventFired(AfterVideoStop.class, 1);
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:26,代码来源:RecorderLifecycleObserverTestCase.java

示例4: startBeforeTestTrueTest

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Test
public void startBeforeTestTrueTest() throws Exception {

    Mockito.when(configuration.getStartBeforeTest()).thenReturn(true);

    fire(new VideoExtensionConfigured());

    fire(new BeforeSuite());
    fire(new BeforeClass(DummyTestCase.class));
    fire(new Before(DummyTestCase.class, DummyTestCase.class.getMethod("test")));

    bind(TestScoped.class, TestResult.class, TestResult.passed());

    fire(new AfterRules(DummyTestCase.class, DummyTestCase.class.getMethod("test"), LifecycleMethodExecutor.NO_OP));
    fire(new AfterClass(DummyTestCase.class));
    fire(new AfterSuite());

    assertEventFired(BeforeVideoStart.class, 1);
    assertEventFired(StartRecordVideo.class, 1);
    assertEventFired(AfterVideoStart.class, 1);

    assertEventFired(BeforeVideoStop.class, 1);
    assertEventFired(StopRecordVideo.class, 1);
    assertEventFired(AfterVideoStop.class, 1);
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:26,代码来源:RecorderLifecycleObserverTestCase.java

示例5: shouldStopAndDestroyAutoContainers

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Test
public void shouldStopAndDestroyAutoContainers() {

    Map<String, String> dockerData = new HashMap<String, String>();
    dockerData.put("autoStartContainers", "a,b");
    dockerData.put("dockerContainers", "a:\n  image: a\nb:\n  image: a\n");

    CubeConfiguration cubeConfiguration = CubeConfiguration.fromMap(new HashMap<String, String>());
    bind(ApplicationScoped.class, CubeConfiguration.class, cubeConfiguration);

    CubeDockerConfiguration dockerConfiguration = CubeDockerConfiguration.fromMap(dockerData, null);
    bind(ApplicationScoped.class, CubeDockerConfiguration.class, dockerConfiguration);

    fire(new AfterSuite());

    assertEventFired(StopCube.class, 2);
    assertEventFired(DestroyCube.class, 2);
    assertEventFiredOnOtherThread(StopCube.class);
    assertEventFiredOnOtherThread(DestroyCube.class);
}
 
开发者ID:arquillian,项目名称:arquillian-cube,代码行数:21,代码来源:CubeSuiteLifecycleControllerTest.java

示例6: stopTestSuite

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void stopTestSuite(@Observes(precedence = Integer.MIN_VALUE) AfterSuite event) {

        Reporter
            .createReport(new TestSuiteReport(TEST_SUITE_NAME))
            .stop()
            .inSection(new TestSuiteSection(DEFAULT_TEST_SUITE_ID))
            .fire(sectionEvent);
    }
 
开发者ID:arquillian,项目名称:arquillian-reporter,代码行数:9,代码来源:ArquillianCoreReporterLifecycleManager.java

示例7: unsetProperties

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void unsetProperties(@Observes AfterSuite event) {
	Properties props = load(SystemProperties.FILE_NAME);
	if (props != null) {
		for (Map.Entry<Object, Object> entry : props.entrySet()) {
			System.clearProperty(entry.getKey().toString());
		}
	}
}
 
开发者ID:Blazebit,项目名称:blaze-storage,代码行数:9,代码来源:SystemPropertiesLoader.java

示例8: stopPumbaContainer

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void stopPumbaContainer(@Observes AfterSuite afterSuite) {
    final Cube<?> cube = cubeRegistryInstance.get().getCube(StandaloneContainer.Builder.DEFAULT_NAME);
    if (cube != null) {
        if (cube.state() != Cube.State.STOPPED && cube.state() != Cube.State.DESTROYED) {
            cubeControllerInstance.get().stop(StandaloneContainer.Builder.DEFAULT_NAME);
            cubeControllerInstance.get().destroy(StandaloneContainer.Builder.DEFAULT_NAME);
        }
    }
}
 
开发者ID:arquillian,项目名称:arquillian-cube-q,代码行数:10,代码来源:QContainerChaosPumbaStopper.java

示例9: on

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void on(@Observes AfterSuite event, JiraGovernorClient jiraGovernorClient) {
    for (final Map.Entry<Annotation, Boolean> entry : closePassedDecider.get().get().entrySet()) {
        final Annotation annotation = entry.getKey();
        if (annotation.annotationType() == provides() && entry.getValue()) {
            final String id = ((Jira) annotation).value();
            jiraGovernorClient.close(id);
        }
    }
}
 
开发者ID:arquillian,项目名称:arquillian-governor,代码行数:10,代码来源:JiraTestExecutionDecider.java

示例10: on

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void on(@Observes AfterSuite event, GitHubGovernorClient githubGovernorClient) {
    for (final Map.Entry<Annotation, Boolean> entry : closePassedDecider.get().get().entrySet()) {
        final Annotation annotation = entry.getKey();
        if (annotation.annotationType() == provides() && entry.getValue()) {
            final String id = ((GitHub) annotation).value();
            githubGovernorClient.close(id);
        }
    }
}
 
开发者ID:arquillian,项目名称:arquillian-governor,代码行数:10,代码来源:GitHubTestExecutionDecider.java

示例11: afterSuite

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
public void afterSuite(@Observes AfterSuite event) {
    if (strategy.get().isTakingAction(event)) {
        VideoMetaData metaData = getMetaData();
        VideoType videoType = getVideoType();

        beforeVideoStop.fire(new BeforeVideoStop(videoType, metaData));

        stopRecordSuiteVideo.fire(new StopRecordSuiteVideo(videoType, metaData));

        afterVideoStop.fire(new AfterVideoStop(videoType, metaData));
    }
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:13,代码来源:VideoLifecycleObserver.java

示例12: isTakingAction

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Override
public boolean isTakingAction(Event event) {
    if (event instanceof BeforeSuite
            || event instanceof AfterSuite) {
        return configuration.getStartBeforeSuite();
    } else if (event instanceof BeforeClass
            || event instanceof AfterClass) {
        return configuration.getStartBeforeClass();
    } else if (event instanceof Before) {
        return configuration.getStartBeforeTest()
            || configuration.getTakeOnlyOnFail();
    }

    return false;
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:16,代码来源:DefaultVideoStrategy.java

示例13: defaultConfigurationTest

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Test
public void defaultConfigurationTest() throws Exception {

    // by default, no videos are taken at all

    fire(new VideoExtensionConfigured());

    fire(new BeforeSuite());
    fire(new BeforeClass(DummyTestCase.class));
    fire(new Before(DummyTestCase.class, DummyTestCase.class.getMethod("test")));

    bind(TestScoped.class, TestResult.class, TestResult.passed());

    fire(new AfterRules(DummyTestCase.class, DummyTestCase.class.getMethod("test"), LifecycleMethodExecutor.NO_OP));
    fire(new AfterClass(DummyTestCase.class));
    fire(new AfterSuite());

    assertEventFired(BeforeVideoStart.class, 0);
    assertEventFired(StartRecordVideo.class, 0);
    assertEventFired(StartRecordSuiteVideo.class, 0);
    assertEventFired(AfterVideoStart.class, 0);

    assertEventFired(BeforeVideoStop.class, 0);
    assertEventFired(StopRecordVideo.class, 0);
    assertEventFired(StopRecordSuiteVideo.class, 0);
    assertEventFired(AfterVideoStop.class, 0);
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:28,代码来源:RecorderLifecycleObserverTestCase.java

示例14: takeOnlyOnFailTestFailedTest

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Test
public void takeOnlyOnFailTestFailedTest() throws Exception {

    Mockito.when(configuration.getTakeOnlyOnFail()).thenReturn(true);

    fire(new VideoExtensionConfigured());

    fire(new BeforeSuite());
    fire(new BeforeClass(DummyTestCase.class));
    fire(new Before(DummyTestCase.class, DummyTestCase.class.getMethod("test")));

    bind(TestScoped.class, TestResult.class, TestResult.failed(new RuntimeException("some exception")));

    fire(new AfterRules(DummyTestCase.class, DummyTestCase.class.getMethod("test"), LifecycleMethodExecutor.NO_OP));
    fire(new AfterClass(DummyTestCase.class));
    fire(new AfterSuite());

    assertEventFired(BeforeVideoStart.class, 1);
    assertEventFired(StartRecordVideo.class, 1);
    assertEventFired(AfterVideoStart.class, 1);

    assertEventFired(PropertyReportEvent.class, 1);

    assertEventFired(BeforeVideoStop.class, 1);
    assertEventFired(StopRecordVideo.class, 1);
    assertEventFired(AfterVideoStop.class, 1);
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:28,代码来源:RecorderLifecycleObserverTestCase.java

示例15: takeOnlyOnFailTestPassedTest

import org.jboss.arquillian.test.spi.event.suite.AfterSuite; //导入依赖的package包/类
@Test
public void takeOnlyOnFailTestPassedTest() throws Exception {

    Mockito.when(configuration.getTakeOnlyOnFail()).thenReturn(true);

    fire(new VideoExtensionConfigured());

    fire(new BeforeSuite());
    fire(new BeforeClass(DummyTestCase.class));
    fire(new Before(DummyTestCase.class, DummyTestCase.class.getMethod("test")));

    bind(TestScoped.class, TestResult.class, TestResult.passed());

    fire(new AfterRules(DummyTestCase.class, DummyTestCase.class.getMethod("test"), LifecycleMethodExecutor.NO_OP));
    fire(new AfterClass(DummyTestCase.class));
    fire(new AfterSuite());

    assertEventFired(BeforeVideoStart.class, 1);
    assertEventFired(StartRecordVideo.class, 1);
    assertEventFired(AfterVideoStart.class, 1);

    assertEventFired(PropertyReportEvent.class, 0);

    assertEventFired(BeforeVideoStop.class, 1);
    assertEventFired(StopRecordVideo.class, 1);
    assertEventFired(AfterVideoStop.class, 1);
}
 
开发者ID:arquillian,项目名称:arquillian-recorder,代码行数:28,代码来源:RecorderLifecycleObserverTestCase.java


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