Commit 3b2019ca by Jonathan Thomas

Fixed unit tests for friendship (some were being skipped). Updated unit tests…

Fixed unit tests for friendship (some were being skipped). Updated unit tests output JSON (for comparison)
parent bef62fd1
Pipeline #13333 passed with stages
in 2 minutes 23 seconds
......@@ -18,6 +18,7 @@ All notable changes to **CreatureChat** are documented in this file. The format
### Fixed
- Reduced death message output in logs to use DEBUG log level
- Fixed unit tests for friendship (some were being skipped)
## [1.2.1] - 2025-01-01
......
Respond to the player as the Minecraft entity below. Stay in character, keep it concise (fits in a chat bubble),
Respond to the player as the Minecraft entity below. Stay in character, keep it extremely concise (fits in a chat bubble),
and use the player's language. Add behaviors when needed. Never break the 4th wall.
{{story}}
......
......@@ -189,14 +189,18 @@ public class BehaviorTests {
@Test
public void friendshipUpNervous() {
ParsedMessage result = testPromptForBehavior(nervousPath, friendshipUpMessages, "FRIENDSHIP+", null);
assertTrue(result.getBehaviors().stream().anyMatch(b -> "FRIENDSHIP".equals(b.getName()) && b.getArgument() > 0));
for (String message : friendshipUpMessages) {
ParsedMessage result = testPromptForBehavior(nervousPath, List.of(message), "FRIENDSHIP+", null);
assertTrue(result.getBehaviors().stream().anyMatch(b -> "FRIENDSHIP".equals(b.getName()) && b.getArgument() > 0));
}
}
@Test
public void friendshipUpBrave() {
ParsedMessage result = testPromptForBehavior(bravePath, friendshipUpMessages, "FRIENDSHIP+", null);
assertTrue(result.getBehaviors().stream().anyMatch(b -> "FRIENDSHIP".equals(b.getName()) && b.getArgument() > 0));
for (String message : friendshipUpMessages) {
ParsedMessage result = testPromptForBehavior(bravePath, List.of(message), "FRIENDSHIP+", null);
assertTrue(result.getBehaviors().stream().anyMatch(b -> "FRIENDSHIP".equals(b.getName()) && b.getArgument() > 0));
}
}
@Test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment