public class UrlDAOTest{@Autowiredprivate UrlDAO dao;private String id="GxxhA62-vabd";@Test@Rollback(false) public void a(){Url u = new Url();u.setId(id);u.setRd("1");u.setTitle("標(biāo)題");u.setType("1");u.setUrl("url");dao.save(u);assertEquals("","");}@Testpublic void b(){assertEquals("標(biāo)題", dao.get(id).getTitle());}@Test@Rollback(false) public void c(){dao.delete(id);}}
1 回答

慕桂英3389331
TA貢獻(xiàn)2036條經(jīng)驗(yàn) 獲得超8個(gè)贊
在類上面加上按名稱排序的標(biāo)記
1 | @FixMethodOrder (MethodSorters.NAME_ASCENDING) |
添加回答
舉報(bào)
0/150
提交
取消