1 /*
2 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
3 * The software in this package is published under the terms of the CPAL v1.0
4 * license, a copy of which has been included with this distribution in the
5 * LICENSE.txt file.
6 */
7 package org.mule.transport.xmpp;
8
9 import org.mule.tck.junit4.FunctionalTestCase;
10
11 /**
12 * This should be the superclass for all unit tests in the XMPP transport that require an external
13 * Jabber server to work with. It allows to enable or disable unit tests by setting the system
14 * property <em>jabber.test.enabled</em>.
15 */
16 public abstract class XmppEnableDisableTestCase extends FunctionalTestCase
17 {
18 public static boolean isTestDisabled()
19 {
20 boolean testEnabled = Boolean.getBoolean("jabber.test.enabled");
21 return (testEnabled == false);
22 }
23
24 @Override
25 protected boolean isDisabledInThisEnvironment()
26 {
27 return XmppEnableDisableTestCase.isTestDisabled();
28 }
29 }