20 |
20 |
import org.dbunit.dataset.DataSetException;
|
21 |
21 |
import org.dbunit.dataset.IDataSet;
|
22 |
22 |
import org.dbunit.dataset.xml.FlatXmlDataSet;
|
|
23 |
import org.junit.Assert;
|
23 |
24 |
import org.junit.Before;
|
24 |
25 |
import org.junit.Ignore;
|
25 |
26 |
import org.junit.Test;
|
... | ... | |
82 |
83 |
*/
|
83 |
84 |
@Test
|
84 |
85 |
@DataSet("CacheStrategyGeneratorTest.xml")
|
85 |
|
@ExpectedDataSet
|
|
86 |
//@ExpectedDataSet
|
86 |
87 |
public void testOnSaveOrUpdateNames() {
|
87 |
88 |
//names
|
88 |
89 |
BotanicalName name = (BotanicalName)cdmEntityDaoBase.findByUuid(UUID.fromString("a49a3963-c4ea-4047-8588-2f8f15352730"));
|
... | ... | |
105 |
106 |
name2.setNomenclaturalMicroReference("44");
|
106 |
107 |
|
107 |
108 |
cdmEntityDaoBase.saveOrUpdate(name2);
|
|
109 |
|
|
110 |
Assert.assertEquals(name, cdmEntityDaoBase.findByUuid(name.getUuid()));
|
|
111 |
BotanicalName nameTest = (BotanicalName)cdmEntityDaoBase.findByUuid(name.getUuid());
|
|
112 |
System.err.println(nameTest.getFullTitleCache());
|
|
113 |
Assert.assertEquals(name2, cdmEntityDaoBase.findByUuid(name2.getUuid()));
|
|
114 |
System.err.println(cdmEntityDaoBase.findByUuid(name2.getUuid()).getFullTitleCache());
|
108 |
115 |
// BotanicalName name3 = (BotanicalName)cdmEntityDaoBase.findByUuid(UUID.fromString("049a3963-c4ea-4047-8588-2f8f15352730"));
|
109 |
116 |
// printDataSet(System.err, new String[]{"TaxonNameBase", "ReferenceBase"});
|
110 |
117 |
}
|
... | ... | |
114 |
121 |
*/
|
115 |
122 |
@Test
|
116 |
123 |
@DataSet("CacheStrategyGeneratorTest.xml")
|
117 |
|
@ExpectedDataSet
|
|
124 |
//@ExpectedDataSet
|
118 |
125 |
public void testOnSaveOrUpdateAgents() {
|
119 |
126 |
|
120 |
127 |
// 646dad4b-0f0e-4f5a-b059-8099ad9a6125
|
... | ... | |
159 |
166 |
team1.setUuid(UUID.fromString("db957a0a-1494-49bb-8d17-d3eaa2076573"));
|
160 |
167 |
agentDao.saveOrUpdate(team1);
|
161 |
168 |
|
162 |
|
person3 = (Person)agentDao.findByUuid(UUID.fromString("049a3963-c4ea-4047-8588-2f8f15352730"));
|
|
169 |
Person person4 = (Person)agentDao.findByUuid(UUID.fromString("4c4e15e3-3a4f-4505-900a-fae2555ac9e4"));
|
|
170 |
Assert.assertEquals(person3, person4);
|
|
171 |
Team team2 = (Team) agentDao.findByUuid(UUID.fromString("db957a0a-1494-49bb-8d17-d3eaa2076573"));
|
|
172 |
Assert.assertEquals(team1, team2);
|
163 |
173 |
// printDataSet(System.err, new String[]{"AgentBase"});
|
164 |
174 |
// System.out.println("End");
|
165 |
175 |
}
|
changes for ticket #1286