diff --git a/src/test/java/com/loafle/overflow/module/probe/dao/ProbeDAOTest.java b/src/test/java/com/loafle/overflow/module/probe/dao/ProbeDAOTest.java index ebe46ac..33d5070 100644 --- a/src/test/java/com/loafle/overflow/module/probe/dao/ProbeDAOTest.java +++ b/src/test/java/com/loafle/overflow/module/probe/dao/ProbeDAOTest.java @@ -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 ps = this.probeDAO.findAllByDomainId(1); + + + Assert.assertNotEquals(ps.size(), 0); + } } \ No newline at end of file