package de.gurkenlabs.litiengine.attributes;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

class AttributeModifierTest {

  @Test
  void testInitAttributeModifier() {
    final AttributeModifier<Integer> testAttributeModifier = new AttributeModifier<>(Modification.ADD, 5);
    assertEquals(Modification.ADD, testAttributeModifier.getModification());
    assertEquals(5.0, testAttributeModifier.getModifyValue());
    assertTrue(testAttributeModifier.isActive());
  }

  @Test
  void testModifyValueWithInactiveAttributeModifierActive() {
    final AttributeModifier<Integer> testAttributeModifierActive = new AttributeModifier<>(Modification.ADD, 5);
    testAttributeModifierActive.setActive(true);
    assertEquals(7, testAttributeModifierActive.modify(2));
  }

  @Test
  void testModifyValueWithInactiveAttributeModifierInactive() {
    final AttributeModifier<Integer> testAttributeModifierInactive = new AttributeModifier<>(Modification.ADD, 5);
    testAttributeModifierInactive.setActive(false);
    assertEquals(2, testAttributeModifierInactive.modify(2));
  }
}
@@ -633,22 +633,16 @@
 Modifier
-Active
 () %7B%0A   
@@ -747,36 +747,38 @@
 on.ADD, 5);%0A    
-test
+final 
 AttributeModifie
@@ -782,51 +782,17 @@
 fier
-Active.setActive(true);%0A    assertEquals(7,
+%3CInteger%3E
  tes
@@ -813,222 +813,186 @@
 fier
-A
+Ina
 ctive
-.modify(2));%0A  %7D%0A%0A  @Test%0A  void testModifyValueWithInactiveAttributeModifierInactive() %7B%0A    final AttributeModifier%3CInteger%3E testAttributeModifierInactive = new AttributeModifier%3C%3E(Modification.ADD, 5
+ = new AttributeModifier%3C%3E(Modification.ADD, 5);%0A    testAttributeModifierActive.setActive(true);%0A    testAttributeModifierInactive.setActive(false
 );%0A
+%0A
    
+ assertEquals(7,
  tes
@@ -1013,32 +1013,24 @@
 fier
-Ina
+A
 ctive.
-setActive(false
+modify(2)
 );%0A 

Remove commit