@@ -0,0 +1,1814 @@
+package com.fionapet.business.repository;%0A%0Aimport com.fionapet.business.entity.ItemType;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.test.context.ContextConfiguration;%0Aimport org.springside.modules.test.spring.SpringTransactionalTestCase;%0A%0Aimport java.util.List;%0A%0A/**%0A * Created by tom on 16/6/21.%0A */%0A@ContextConfiguration(locations = %7B%22/META-INF/spring/applicationContext.xml%22%7D)%0Apublic class TestItemTypeRaceDao extends SpringTransactionalTestCase %7B%0A    private static final Logger LOGGER = LoggerFactory.getLogger(TestItemTypeRaceDao.class);%0A    @Autowired%0A    private ItemTypeDao itemTypeDao;%0A%0A%0A    @Test%0A    public void findAll() %7B%0A        List%3CItemType%3E ItemTypes = itemTypeDao.findAllByOrderByCreateDateAsc();%0A%0A        Assert.assertNotNull(ItemTypes);%0A       // Assert.assertEquals(ItemTypes.size(),12);%0A    %7D%0A%0A    @Test%0A    public void curd()%7B%0A        String name = %22%E5%AE%A0%E7%89%A9%E8%8D%AF%E5%93%811%22;%0A        String userId = %22fc5db3b3-4063-4a12-a511-880ba19e4b58%22;%0A        ItemType itemType = itemTypeDao.findByItemName(name);%0A%0A        Assert.assertNull(itemType);%0A%0A        itemType = new ItemType();%0A        itemType.setItemName(%22%E5%AE%A0%E7%89%A9%E8%8D%AF%E5%93%81A%22);%0A%0A        itemType.setCreateUserId(userId);%0A        itemType.setUpdateUserId(userId);%0A%0A        itemTypeDao.save(itemType);%0A%0A        Assert.assertNotNull(itemType.getUuid());%0A%0A        itemType.setItemName(%22%E5%AE%A0%E7%89%A9%E8%8D%AF%E5%93%81A%22);%0A%0A        itemTypeDao.save(itemType);%0A%0A        itemType = itemTypeDao.findByItemName(name);%0A%0A        Assert.assertNull(itemType);%0A%0A        itemType = itemTypeDao.findByItemName(%22%E5%AE%A0%E7%89%A9%E8%8D%AF%E5%93%81A%22);%0A%0A        itemTypeDao.delete(itemType);%0A%0A        itemType = itemTypeDao.findByItemName(%22%E5%AE%A0%E7%89%A9%E8%8D%AF%E5%93%81A%22);%0A%0A        Assert.assertNull(itemType);%0A    %7D%0A%7D%0A

add table t_item_type