Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
package com.loafle.overflow.meta.dao;
|
||||
|
||||
import com.loafle.overflow.AppConfig;
|
||||
import com.loafle.overflow.JdbcConfiguration;
|
||||
import com.loafle.overflow.meta.model.MetaProbeTaskType;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 6. 26.
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class})
|
||||
public class MetaProbeTaskTypeDAOTest {
|
||||
|
||||
@Autowired
|
||||
private MetaProbeTaskTypeDAO metaProbeTaskTypeDAO;
|
||||
|
||||
|
||||
@Test
|
||||
public void Create() {
|
||||
|
||||
MetaProbeTaskType metaDiscovery = new MetaProbeTaskType();
|
||||
|
||||
metaDiscovery.setDescription("DISCOVERY START");
|
||||
metaDiscovery.setName("DISCOVERY");
|
||||
|
||||
|
||||
List<MetaProbeTaskType> pttlist = new ArrayList<>();
|
||||
|
||||
pttlist.add(metaDiscovery);
|
||||
|
||||
for(int indexI = 1; indexI <= pttlist.size() ;++indexI) {
|
||||
MetaProbeTaskType type = pttlist.get(indexI - 1);
|
||||
type.setId((short)indexI);
|
||||
this.metaProbeTaskTypeDAO.save(type);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user