package com.hida.dao;

import org.dbunit.dataset.IDataSet;
import org.dbunit.dataset.xml.FlatXmlDataSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.Assert;
import org.testng.annotations.Test;

/**
 *
 * @author lruffin
 */
public class DefaultSettingDaoImplTest extends EntityDaoImplTest {

    @Autowired
    DefaultSettingDao DefaultSettingDao;

    @Override
    protected IDataSet getDataSet() throws Exception {
        IDataSet dataSet = new FlatXmlDataSet(this.getClass().getClassLoader().
                getResourceAsStream("DefaultSetting.xml"));
        return dataSet;
    }

    @Test
    public void save() {
        Assert.fail("unimplemented");
    }

    @Test
    public void deleteSetting() {
        Assert.fail("unimplemented");
    }

    @Test
    public void getDefaultSetting() {
        Assert.fail("unimplemented");
    }

}

@@ -16,16 +16,87 @@
 a.dao;%0A%0A
+import com.hida.model.DefaultSetting;%0Aimport com.hida.model.TokenType;%0A
 import o
@@ -720,16 +720,20 @@
 oid save
+Test
 () %7B%0A   
@@ -741,35 +741,165 @@
     
-Assert.fail(%22unimplemented%22
+DefaultSettingDao.save(getSampleDefaultSetting());%0A        DefaultSetting entity = DefaultSettingDao.getDefaultSetting();%0A        Assert.assertNotNull(entity
 );%0A 
@@ -895,32 +895,36 @@
 (entity);%0A    %7D%0A
+    
 %0A    @Test%0A    p
@@ -938,14 +938,94 @@
 oid 
-delete
+getDefaultSettingTest() %7B%0A        DefaultSetting entity = DefaultSettingDao.getDefault
 Sett
@@ -1021,34 +1021,33 @@
 DefaultSetting()
- %7B
+;
 %0A        Assert.
@@ -1046,36 +1046,36 @@
  Assert.
-fail(%22unimplemented%22
+assertNotNull(entity
 );%0A    %7D
@@ -1084,88 +1084,304 @@
     
-@Test
+%0A
 %0A    p
-ublic void getDefaultSetting() %7B%0A        Assert.fail(%22unimplemented%22)
+rivate DefaultSetting getSampleDefaultSetting() %7B%0A        DefaultSetting setting = new DefaultSetting(%22%22,%0A                %22%22,%0A                TokenType.DIGIT,%0A                %22d%22,%0A                1,%0A                true,%0A                true,%0A                true);%0A%0A        return setting
 ;%0A  

Remove test cases in DefaultSettingDaoImplTest