aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/java/org/openecomp/sdc/common/transaction/impl/ESActionTest.java
blob: e01879226fb9c339cc2124950f4c9ffbe702db78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package org.openecomp.sdc.common.transaction.impl;

import org.junit.Test;
import org.openecomp.sdc.be.dao.impl.ESCatalogDAO;
import org.openecomp.sdc.be.resources.data.ESArtifactData;
import org.openecomp.sdc.common.transaction.api.TransactionUtils.DBActionCodeEnum;
import org.openecomp.sdc.common.transaction.api.TransactionUtils.ESActionTypeEnum;
import org.openecomp.sdc.exception.IndexingServiceException;

public class ESActionTest {

	@Test
	public void testDoAction() throws Exception {
		ESAction testSubject = new ESAction(new ESCatalogDAO(), new ESArtifactData(), ESActionTypeEnum.ADD_ARTIFACT);;
		DBActionCodeEnum result;

		// default test
		result = testSubject.doAction();
	}
	
	@Test(expected = IndexingServiceException.class)
	public void testDoAction1() throws Exception {
		ESAction testSubject = new ESAction(new ESCatalogDAO(), new ESArtifactData(), ESActionTypeEnum.REMOVE_ARTIFACT);;
		DBActionCodeEnum result;

		// default test
		result = testSubject.doAction();
	}
}