summaryrefslogtreecommitdiff
path: root/Tests/ComponentTests/ParserTests/test_LookCommand.gd
diff options
context:
space:
mode:
authorSophia Pearson <codergal89@gmail.com>2022-09-04 21:52:27 +0200
committerSophia Pearson <codergal89@gmail.com>2022-09-04 21:52:27 +0200
commitf711d55d465bd8838dc55bde1f4a25d582a6bb6b (patch)
treee2b5b2ac79adf23e5f2c475ce11ee1c3c6561f0b /Tests/ComponentTests/ParserTests/test_LookCommand.gd
parent2f3abbb6f1141f15ef77ac27e431bc66bb0c7899 (diff)
downloadtexty-f711d55d465bd8838dc55bde1f4a25d582a6bb6b.tar.xz
texty-f711d55d465bd8838dc55bde1f4a25d582a6bb6b.zip
tests: adjust tests to new design
Diffstat (limited to 'Tests/ComponentTests/ParserTests/test_LookCommand.gd')
-rw-r--r--Tests/ComponentTests/ParserTests/test_LookCommand.gd55
1 files changed, 0 insertions, 55 deletions
diff --git a/Tests/ComponentTests/ParserTests/test_LookCommand.gd b/Tests/ComponentTests/ParserTests/test_LookCommand.gd
deleted file mode 100644
index 32268b0..0000000
--- a/Tests/ComponentTests/ParserTests/test_LookCommand.gd
+++ /dev/null
@@ -1,55 +0,0 @@
-extends CommandParserTestBase
-
-const LookCommand = preload("res://Scripts/Commands/LookCommand.cs")
-
-var _around_permutations = generate_capitalization_permutations('around')
-var _at_permutations = generate_capitalization_permutations('at')
-var _look_permutations = generate_capitalization_permutations('look')
-
-func parse(input: String) -> LookCommand:
- return autofree(_instance.TryParse(input))
-
-func test_parsing_look_command_without_an_argument_returns_non_null():
- assert_not_null(parse('look'))
-
-func test_parsing_look_command_is_case_insensitive(permutation=use_parameters(_look_permutations)):
- assert_not_null(parse(permutation))
-
-func test_parsing_look_command_without_an_argument_returns_look_command_with_an_emtpy_target():
- assert_eq('', parse('look').Target)
-
-func test_parsing_look_at_command_is_case_insensitive(permutation=use_parameters(_at_permutations)):
- assert_not_null(parse('look ' + permutation))
-
-func test_parsing_look_at_command_without_further_arguments_returns_look_command_with_an_emtpy_target():
- assert_eq('', parse('look at').Target)
-
-func test_parsing_look_at_command_without_further_arguments_returns_look_command_with_non_null_modifier():
- assert_not_null(parse('look at').Modifier)
-
-func test_parsing_look_at_command_without_further_arguments_returns_look_command_with_at_modifier():
- assert_eq('At', parse('look at').ModifierAsString)
-
-func test_parsing_look_at_command_with_more_arguments_returns_look_command_with_non_empty_target():
- assert_ne('', parse('look at door on the left').Target)
-
-func test_parsing_look_at_command_with_an_additional_argument_returns_look_command_with_the_additional_argument_as_the_target():
- assert_eq('window', parse('look at window').Target)
-
-func test_parsing_look_at_command_with_multiple_additional_arguments_returns_look_command_with_the_additional_arguments_as_the_target():
- assert_eq('table near the door', parse('look at table near the door').Target)
-
-func test_parsing_look_around_command_is_case_insensitive(permutation=use_parameters(_around_permutations)):
- assert_not_null(parse('look ' + permutation))
-
-func test_parsing_look_around_command_without_further_arguments_returns_look_command_with_an_empty_target():
- assert_eq('', parse('look around').Target)
-
-func test_parsing_look_around_command_without_further_arguments_returns_look_command_with_non_null_modifier():
- assert_not_null(parse('look around').Modifier)
-
-func test_parsing_look_around_command_without_further_arguments_returns_look_command_with_around_modifier():
- assert_eq('Around', parse('look around').ModifierAsString)
-
-func test_parsing_look_around_command_ignores_all_additional_arguments():
- assert_eq('', parse('look around the room').Target)