2018-07-05 18:29:38 +02:00
|
|
|
package org.gcube.portlets.user.accountingdashboard;
|
|
|
|
|
|
|
|
import org.gcube.portlets.user.accountingdashboard.server.accounting.AccountingService;
|
2018-07-06 17:48:46 +02:00
|
|
|
import org.gcube.portlets.user.accountingdashboard.server.accounting.AccountingServiceType;
|
2018-07-05 18:29:38 +02:00
|
|
|
import org.gcube.portlets.user.accountingdashboard.shared.Constants;
|
|
|
|
import org.junit.Test;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
import junit.framework.TestCase;
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @author Giancarlo Panichi
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public class AccountingServiceTest extends TestCase {
|
|
|
|
private static Logger logger = LoggerFactory.getLogger(AccountingServiceTest.class);
|
|
|
|
|
|
|
|
@Test
|
2018-07-16 18:56:04 +02:00
|
|
|
public void testService() {
|
2018-07-05 18:29:38 +02:00
|
|
|
if (Constants.TEST_ENABLE) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
AuthTest.setToken();
|
2020-04-07 17:34:45 +02:00
|
|
|
new AccountingService(AccountingServiceType.CurrentScope,null);
|
2020-02-14 15:04:07 +01:00
|
|
|
//accountingService.getTree();
|
2018-07-05 18:29:38 +02:00
|
|
|
|
2020-01-21 11:28:33 +01:00
|
|
|
assertTrue(true);
|
2018-07-05 18:29:38 +02:00
|
|
|
} catch (Throwable e) {
|
|
|
|
logger.error(e.getLocalizedMessage(), e);
|
|
|
|
fail("Error:" + e.getLocalizedMessage());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
2020-01-21 11:28:33 +01:00
|
|
|
assertTrue(true);
|
2018-07-05 18:29:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-06 17:48:46 +02:00
|
|
|
@Test
|
|
|
|
public void testData() {
|
|
|
|
if (Constants.TEST_ENABLE) {
|
|
|
|
|
|
|
|
try {
|
2020-01-21 11:28:33 +01:00
|
|
|
assertTrue(true);
|
2018-07-16 18:56:04 +02:00
|
|
|
|
2018-07-06 17:48:46 +02:00
|
|
|
} catch (Throwable e) {
|
|
|
|
logger.error(e.getLocalizedMessage(), e);
|
|
|
|
fail("Error:" + e.getLocalizedMessage());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
2020-01-21 11:28:33 +01:00
|
|
|
assertTrue(true);
|
2018-07-06 17:48:46 +02:00
|
|
|
}
|
|
|
|
}
|
2018-07-05 18:29:38 +02:00
|
|
|
|
|
|
|
}
|