本文整理汇总了Java中com.alibaba.cobar.manager.dataobject.xml.PropertyDO类的典型用法代码示例。如果您正苦于以下问题:Java PropertyDO类的具体用法?Java PropertyDO怎么用?Java PropertyDO使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PropertyDO类属于com.alibaba.cobar.manager.dataobject.xml包,在下文中一共展示了PropertyDO类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testDeleteTime
import com.alibaba.cobar.manager.dataobject.xml.PropertyDO; //导入依赖的package包/类
@Test
public void testDeleteTime() {
int timeNum = 10;
for (int i = 0; i < timeNum; i++) {
Assert.assertTrue(propertyDao.addTime(i));
}
PropertyDO propertyDO = propertyDao.getProperty();
Assert.assertEquals(timeNum, propertyDO.getStopTimes().size());
for (int i = 0; i < timeNum - 1; i++) {
Assert.assertTrue(propertyDao.deleteTime(i));
}
propertyDO = propertyDao.getProperty();
Assert.assertEquals(1, propertyDO.getStopTimes().size());
Assert.assertTrue(propertyDao.deleteTime(timeNum - 1));
propertyDO = propertyDao.getProperty();
Assert.assertEquals(0, propertyDO.getStopTimes().size());
}
示例2: testAddFirstTime
import com.alibaba.cobar.manager.dataobject.xml.PropertyDO; //导入依赖的package包/类
@Test
public void testAddFirstTime() {
int time = 10;
Assert.assertTrue(propertyDao.addTime(time));
PropertyDO propertyDO = propertyDao.getProperty();
Assert.assertEquals(1, propertyDO.getStopTimes().size());
Assert.assertEquals((Integer) time, propertyDO.getStopTimes().get(0));
}
示例3: testAddManyTime
import com.alibaba.cobar.manager.dataobject.xml.PropertyDO; //导入依赖的package包/类
@Test
public void testAddManyTime() {
int timeNum = 10;
for (int i = 0; i < timeNum; i++) {
Assert.assertTrue(propertyDao.addTime(i));
}
PropertyDO propertyDO = propertyDao.getProperty();
Assert.assertEquals(timeNum, propertyDO.getStopTimes().size());
}
示例4: testAddDuplicatedTime
import com.alibaba.cobar.manager.dataobject.xml.PropertyDO; //导入依赖的package包/类
@Test
public void testAddDuplicatedTime() {
int time = 1;
Assert.assertTrue(propertyDao.addTime(time));
for (int i = 0; i < 10; i++) {
Assert.assertFalse(propertyDao.addTime(time));
}
PropertyDO propertyDO = propertyDao.getProperty();
Assert.assertEquals(1, propertyDO.getStopTimes().size());
Assert.assertEquals((Integer) time, propertyDO.getStopTimes().get(0));
}
示例5: testDeleteNonExistsTime
import com.alibaba.cobar.manager.dataobject.xml.PropertyDO; //导入依赖的package包/类
@Test
public void testDeleteNonExistsTime() {
int time = 10;
PropertyDO propertyDO = propertyDao.getProperty();
Assert.assertEquals(0, propertyDO.getStopTimes().size());
Assert.assertFalse(propertyDao.deleteTime(time));
}
示例6: PropertyDAOImple
import com.alibaba.cobar.manager.dataobject.xml.PropertyDO; //导入依赖的package包/类
public PropertyDAOImple(){
this.xpp = new MXParser();
this.xsl = new MXSerializer();
this.property = new PropertyDO();
}
示例7: getProperty
import com.alibaba.cobar.manager.dataobject.xml.PropertyDO; //导入依赖的package包/类
public PropertyDO getProperty() {
return property;
}
示例8: setProperty
import com.alibaba.cobar.manager.dataobject.xml.PropertyDO; //导入依赖的package包/类
public void setProperty(PropertyDO property) {
this.property = property;
}
示例9: PropertyDAOImple
import com.alibaba.cobar.manager.dataobject.xml.PropertyDO; //导入依赖的package包/类
public PropertyDAOImple() {
this.xpp = new MXParser();
this.xsl = new MXSerializer();
this.property = new PropertyDO();
}