Skip to content

Commit 08b2234

Browse files
authored
Updated test name, removed duplicate test
1 parent f02d08d commit 08b2234

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

fxgl-entity/src/test/kotlin/com/almasb/fxgl/entity/EntityTest.kt

+2-13
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class EntityTest {
4848
}
4949

5050
@Test
51-
fun `Add component fails if same type already exists`() {
51+
fun `Add component is ignored if same type already exists`() {
5252
val exception = assertDoesNotThrow {
5353
entity.addComponent(TestComponent())
5454
entity.addComponent(TestComponent())
@@ -170,17 +170,6 @@ class EntityTest {
170170
assertThat(entity.components, hasItem(control))
171171
}
172172

173-
// Test seems duplicate, see l.51 `Add component fails if same type already exists`
174-
@Test
175-
fun `Add control fails if same type exists`() {
176-
val control = TestControl()
177-
entity.addComponent(control)
178-
179-
assertDoesNotThrow {
180-
entity.addComponent(control)
181-
}
182-
}
183-
184173
@Test
185174
fun `Add control fails if required module is missing`() {
186175
assertThrows(IllegalStateException::class.java, {
@@ -1028,4 +1017,4 @@ class EntityTest {
10281017
data = bundle.get("data")
10291018
}
10301019
}
1031-
}
1020+
}

0 commit comments

Comments
 (0)