mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge pull request #1037 from sinthuja/origin-wso2-master
Adding depends on methods to test case to make sure the execution order.
This commit is contained in:
commit
8ba43fcf62
@ -38,7 +38,8 @@ public class DataPublisherConfigTest extends BaseAnalyticsDataPublisherTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test(description = "Validating the behaviour od getInstance of the config before calling the init",
|
@Test(description = "Validating the behaviour od getInstance of the config before calling the init",
|
||||||
expectedExceptions = DataPublisherConfigurationException.class)
|
expectedExceptions = DataPublisherConfigurationException.class,
|
||||||
|
dependsOnMethods = "testGetInstanceWithoutInit")
|
||||||
public void testInitWithInvalidConfig() throws DataPublisherConfigurationException {
|
public void testInitWithInvalidConfig() throws DataPublisherConfigurationException {
|
||||||
ClassLoader classLoader = this.getClass().getClassLoader();
|
ClassLoader classLoader = this.getClass().getClassLoader();
|
||||||
URL invalidConfig = classLoader.getResource("carbon-home/repository/conf/etc/" +
|
URL invalidConfig = classLoader.getResource("carbon-home/repository/conf/etc/" +
|
||||||
@ -51,7 +52,8 @@ public class DataPublisherConfigTest extends BaseAnalyticsDataPublisherTest {
|
|||||||
|
|
||||||
|
|
||||||
@Test(description = "Validating the behaviour od getInstance of the config before calling the init",
|
@Test(description = "Validating the behaviour od getInstance of the config before calling the init",
|
||||||
expectedExceptions = DataPublisherConfigurationException.class)
|
expectedExceptions = DataPublisherConfigurationException.class,
|
||||||
|
dependsOnMethods = "testInitWithInvalidConfig")
|
||||||
public void testInitWithInvalidXML() throws DataPublisherConfigurationException {
|
public void testInitWithInvalidXML() throws DataPublisherConfigurationException {
|
||||||
ClassLoader classLoader = this.getClass().getClassLoader();
|
ClassLoader classLoader = this.getClass().getClassLoader();
|
||||||
URL invalidConfig = classLoader.getResource("carbon-home/repository/conf/etc/" +
|
URL invalidConfig = classLoader.getResource("carbon-home/repository/conf/etc/" +
|
||||||
@ -63,7 +65,8 @@ public class DataPublisherConfigTest extends BaseAnalyticsDataPublisherTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test(description = "Validating the init method with all required params", dependsOnMethods = "testInitWithInvalidXML")
|
@Test(description = "Validating the init method with all required params",
|
||||||
|
dependsOnMethods = "testInitWithInvalidXML")
|
||||||
public void testInitWithValidConfig() throws DataPublisherConfigurationException {
|
public void testInitWithValidConfig() throws DataPublisherConfigurationException {
|
||||||
AnalyticsConfiguration.init();
|
AnalyticsConfiguration.init();
|
||||||
AnalyticsConfiguration analyticsConfiguration = AnalyticsConfiguration.getInstance();
|
AnalyticsConfiguration analyticsConfiguration = AnalyticsConfiguration.getInstance();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user