-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Add MTE tests for ItemCommands #12
base: develop
Are you sure you want to change the base?
Conversation
character.upsertComponent(InventoryComponent.class, maybeInventory -> maybeInventory.orElse(new InventoryComponent(40))); | ||
|
||
final BlockItemFactory factory = new BlockItemFactory(entityManager); | ||
final EntityRef blockItem = factory.newInstance(blockManager.getBlockFamily(URI_DIRT), amount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're doing this in #12 as well. We could consider to create a TestUtils
class 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this not needed here... at least not as of now... will be tricky enough to figure out what classifies the added block to be "correct"
//TODO: I don't know what to pass in there, whether it needs to be the player, character, or something else | ||
itemCommands.give(player, URI_DIRT, amount, null); | ||
|
||
final List<EntityRef> filledSlots = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be moved to InventoryUtils::filledSlots(InventoryComponent)
or InventoryUtils::getItemsFrom(InventoryComponent)
.
❌ 39 tests completed, 3 failed, 8 skipped |
this can be closed, @jdrueckert ? |
why? |
Split out from #10