@Test public void equals_Same_Id() { MongoDbPageLayout p_1 = new MongoDbPageLayout(); MongoDbPageLayout p_2 = new MongoDbPageLayout(); p_1.setId("321"); p_2.setId("321"); assertTrue(p_1.equals(p_2)); }
@Test public void equals_Null_Id() { MongoDbPageLayout p_1 = new MongoDbPageLayout(); MongoDbPageLayout p_2 = new MongoDbPageLayout(); p_1.setId("321"); assertFalse(p_1.equals(p_2)); assertFalse(p_2.equals(p_1)); }
@Test public void hashCode_Id_Null() { pageLayout.setId(null); assertNotNull(pageLayout.hashCode()); }
@Test public void equals_Both_Null() { pageLayout.setId(null); MongoDbPageLayout p = new MongoDbPageLayout(); assertTrue(pageLayout.equals(p)); }
@Before public void setup() { pageLayout = new MongoDbPageLayout(); id = "123"; pageLayout.setId(id); }