You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aggregation-platform/test/com/platform/test/TestEncodeService.java

46 lines
1.0 KiB

package com.platform.test;
import java.util.List;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import com.platform.entities.EncodedInfoEntity;
import com.platform.service.EncodeInfoService;
public class TestEncodeService extends SMBasedTest {
private EncodeInfoService eis;
private String testTableName;
@Before
public void initBeforeFunction() {
eis = (EncodeInfoService) this.applicationContext
.getBean("encodeInfoService");
testTableName = "system_info";
}
@Test
public void testGetEncodeNameByCode() {
String result = eis.getEncodeNameByCode("2", testTableName);
Assert.assertTrue(result.equals("部门预算"));
}
/**
* 事务测试
*/
@Test
public void testDeleteEncodeByCode() {
eis.deleteEncodeByCode("4", testTableName);
}
@Test
public void testGetAllEncodeInfo() {
List<EncodedInfoEntity> allEntities = eis
.getAllEncodeInfo(testTableName);
System.out.println(allEntities);
Assert.assertTrue(allEntities.size() >= 1);
}
}