test
This commit is contained in:
snoop 2017-06-23 16:01:10 +09:00
parent c93d7d7285
commit 363135009c

View File

@ -5,12 +5,15 @@ import com.loafle.overflow.JdbcConfiguration;
import com.loafle.overflow.module.domain.Domain;
import com.loafle.overflow.module.probe.model.Probe;
import com.loafle.overflow.module.probe.type.ProbeStatusType;
import org.junit.Assert;
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.List;
import static org.junit.Assert.*;
/**
@ -43,4 +46,24 @@ public class ProbeDAOTest {
this.probeDAO.save(probe);
}
@Test
public void getProbeKey() {
Probe p = this.probeDAO.findByProbeKey("a1e1710557de11e78799080027658d13");
Assert.assertNotEquals(p, null);
}
@Test
public void getProbeList() {
List<Probe> ps = this.probeDAO.findAllByDomainId(1);
Assert.assertNotEquals(ps.size(), 0);
}
}