@Test public void equalsTest() throws Exception { Affaire aff = new AffaireDB(); aff.setId(9999); assertEquals(a.equals(aff), true); aff.setId(9998); assertEquals(a.equals(aff), false); }
@Before public void setUp() throws Exception { a = new AffaireDB(); a.setId(9999); Enqueteur e = mock(EnqueteurDB.class); a.setNom("test_nom"); a.setNumDossier(123); a.setNumInstruction(12); a.setNumParquet(42); a.setDateOrdre(new Date(0)); a.setDateRendu(new Date(0)); a.setDelai(false); a.setComment("test_comment"); a.setEnqueteur(e); }