/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.blogs.verify.test;
import com.liferay.arquillian.extension.junit.bridge.junit.Arquillian;
import com.liferay.portal.kernel.test.rule.AggregateTestRule;
import com.liferay.portal.test.rule.LiferayIntegrationTestRule;
import com.liferay.portal.verify.VerifyProcess;
import com.liferay.portal.verify.test.BaseVerifyProcessTestCase;
import com.liferay.registry.Filter;
import com.liferay.registry.Registry;
import com.liferay.registry.RegistryUtil;
import com.liferay.registry.ServiceTracker;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.runner.RunWith;
/**
* @author Manuel de la Peña
*/
@RunWith(Arquillian.class)
public class BlogsTrackbacksVerifyProcessTest
extends BaseVerifyProcessTestCase {
@ClassRule
@Rule
public static final AggregateTestRule aggregateTestRule =
new LiferayIntegrationTestRule();
@BeforeClass
public static void setUpClass() {
Registry registry = RegistryUtil.getRegistry();
Filter filter = registry.getFilter(
"(&(objectClass=" + VerifyProcess.class.getName() +
")(verify.process.name=com.liferay.blogs.trackbacks))");
_serviceTracker = registry.trackServices(filter);
_serviceTracker.open();
}
@AfterClass
public static void tearDownClass() {
_serviceTracker.close();
}
@Override
protected VerifyProcess getVerifyProcess() {
return _serviceTracker.getService();
}
private static ServiceTracker<VerifyProcess, VerifyProcess> _serviceTracker;
}