Esempio n. 1
0
  @Test
  public void testSetErasable() {
    Category category = new Category("Test");
    category.setErasable(true);
    assertTrue(category.isErasable());

    category.setErasable(false);
    assertFalse(category.isErasable());
  }
Esempio n. 2
0
 @Test(expectedExceptions = IllegalStateException.class)
 public void testSetErasableFailsWhenDefaultCategoryAndErasable() {
   Category category = Category.defaultCategory("Test");
   category.setErasable(true); // This should fail
 }
Esempio n. 3
0
 @Test
 public void testSetErasableSuceedsWhenDefaultCategoryAndNotErasable() {
   Category category = Category.defaultCategory("Test");
   category.setErasable(false); // This should work
   assertFalse(category.isErasable());
 }