Skip to content

Commit

Permalink
Update EntityTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
rofidakhaled committed Dec 13, 2024
1 parent 98c0abf commit 804d0e3
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,17 @@ public void testGetName() {
@Test
public void testSetIsEnabled() {
Entity entity = new Entity("MyEntity");

Entity entity2 = new Entity("child");
entity.addChild(entity2);
entity.setIsEnabled(false);

assertFalse(entity.isEnabled(), "The entity should be disabled after calling setIsEnabled(false).");

assertFalse(entity2.isEnabled(), "The entity child should be disabled after calling setIsEnabled(false).");

entity.setIsEnabled(true);

assertTrue(entity.isEnabled(), "The entity should be enabled after calling setIsEnabled(true).");
assertTrue(entity2.isEnabled(), "The entity child should be enabled after calling setIsEnabled(true).");
}

@Test
Expand Down

0 comments on commit 804d0e3

Please sign in to comment.