-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ duplicate entity instance functionality (#140)
- Loading branch information
Showing
4 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# GdUnit generated TestSuite | ||
class_name EntityTest | ||
extends GdUnitTestSuite | ||
@warning_ignore("unused_parameter") | ||
@warning_ignore("return_value_discarded") | ||
|
||
|
||
# TestSuite generated from | ||
const __source = "res://addons/pandora/model/entity.gd" | ||
|
||
|
||
func test_init_entity() -> void: | ||
var entity = PandoraEntity.new() | ||
entity.init_entity("123", "Test Entity", "res://hello.jpg", "123") | ||
assert_that(entity.get_entity_id()).is_equal("123") | ||
|
||
|
||
func test_instantiate_entity() -> void: | ||
var entity = PandoraEntity.new() | ||
entity.init_entity("123", "Test Entity", "res://hello.jpg", "123") | ||
var instance = entity.instantiate() | ||
assert_that(instance.get_entity_id()).is_equal("123") | ||
assert_bool(instance.is_instance()).is_true() | ||
|
||
|
||
func test_duplicate_entity() -> void: | ||
var entity = PandoraEntity.new() | ||
entity.init_entity("123", "Test Entity", "res://hello.jpg", "123") | ||
var instance = entity.duplicate_instance() | ||
assert_that(instance.get_entity_id()).is_equal("123") | ||
assert_bool(instance.is_instance()).is_true() |