Commit Graph

42 Commits

Author SHA1 Message Date
tastybento
56d7eb4259 Update to BentoBox 2.0.0
Had to ignore some tests because PowerMockito can't mock them for some
reason.
2023-11-12 13:23:22 -08:00
tastybento
1fdcfdd7ef Remove offending test. Was not that useful anyway. 2023-07-08 11:42:52 -07:00
tastybento
480ffd8eb4 Fixed ChallengesManagerTest 2023-06-04 10:49:16 -07:00
tastybento
ddebdf0e62 Fixed ChallengesCommandTest 2023-06-04 10:41:18 -07:00
tastybento
82ba144038 Fixed CompleteChallengeCommandTest 2023-06-04 10:38:45 -07:00
tastybento
53f0a0cb37 Fixed TryToComplete test class 2023-06-04 10:31:52 -07:00
BONNe
de7172ef75 Update ChallengesManagerTest methods with world parameter. 2023-03-31 11:26:54 +03:00
tastybento
9cccfa02ba Remove various code smells. 2022-04-16 15:54:49 -07:00
tastybento
10d8352f1c Fixed test failures. 2022-04-16 15:03:11 -07:00
tastybento
aff6fcec22 Fix failing test. Make player default to being on island. 2022-04-16 14:49:17 -07:00
tastybento
80f748070e Fix error in test class.
Note this does not fix the failing assertion.
2022-04-16 14:42:52 -07:00
tastybento
2263dae70c Fix NPEs when running tests.
Note that there are still test failures, but these are assertions and
not errors.
2022-04-16 14:36:05 -07:00
BONNe
13924a3011 Fixes failing unit-test 2021-09-24 17:19:58 +03:00
BONNe
08d1561138 Implement an option to set which item type will ignore metadata per challenge.
Fixes #261
Fixes #252
2021-09-24 17:16:33 +03:00
tastybento
877c8d2eff Fixes tests 2021-09-23 19:38:10 -07:00
tastybento
7b8cab3689 Fixed ChallengesCommandTest tests 2021-09-23 17:35:26 -07:00
tastybento
c21cae91e1 Fixed errors and tests for CompleteChallengeCommandTest 2021-09-23 17:22:16 -07:00
tastybento
018455f8f6 Prevent errors in TryToCompleteTest
Note - tests still fail.
2021-09-23 17:12:59 -07:00
BONNe
670513e37a Update all commands.
Commands now will have an option to change their call values.
2021-09-19 15:02:15 +03:00
BONNe
29565538c3 Implements Template reading.
Add template loading via Admin Panel.
Improve LibraryPanel so it could find json and yml files.
2021-09-18 21:37:30 +03:00
BONNe
3a3af0e2c8 Updates tests.
ChallengesGUITest is removed because GUI is removed.
2021-09-18 13:04:43 +03:00
BONNe
703658eccc Move managers to a separate directory. 2021-08-14 21:43:42 +03:00
tastybento
95edafd04f
Update CompleteChallengeCommandTest.java 2021-05-12 17:57:44 -07:00
tastybento
c26b27afa1 Clean up databbase_backup after tests. 2021-03-07 11:00:39 -08:00
BONNe
7215e88706 Ignore testBuildNoChallenges() test as it cannot be tested with current approach. 2020-12-05 18:16:00 +02:00
BONNe
3e542036a0 Fixes failing UnitTests for Challenges Addon. 2020-11-05 09:24:06 +02:00
tastybento
7060799bcc
Rewards lore (#248)
* Ignore failing test because method now doesn't do anything.

* Add spaces after color codes to make gitLocalize more accurate.

* Added a rewards title and made the lore prettier.
2020-07-12 14:43:15 +03:00
tastybento
6203b92f2e Fixed tests. 2020-05-09 12:51:13 -07:00
tastybento
bda02fe55b Fix broken tests due to placeholder additions.
b5ecffb725
2958ca8b6c
2020-04-06 17:20:53 -07:00
tastybento
6368585a57
Fixes bug with checking entities in nether and end (#219)
https://github.com/BentoBoxWorld/Challenges/issues/218

Adds test case to check for compliance.
2020-03-09 11:39:59 +02:00
tastybento
4cb4c7e3fb Fixes tests 2019-11-03 14:12:09 -08:00
tastybento
9d45f08fb1 Test coverage (#199)
* Test coverage for Challenges Command

* Added CompleteChallengeCommand test class

* Added Utils test class

* Added ChallengesGUI test class

* Fix code smells from sonarcloud analysis

* Added .gitignore

* Added Travis CI config file

* WIP ChallengesManager Test class

* Added ChallengesManager test class

* Removed debug

* Removed code smells.

* Added ChallengesAddon test class.

* Added onDisbale test

* Added new TryToComplete test class - WIP

Covers inventory challenges.

* Added Island Challenge entity tests to TryToComplete test class
2019-10-30 08:44:26 +02:00
tastybento
2aa437f071 English update (#193)
* Organized imports

* Minor code cleanup

* Updated English locale file.
2019-10-10 08:35:25 +03:00
BONNe
deab2d3530 Fix failing Tests.
These tests failed because in I added Server version check in ChallengesAddon class.
2019-05-24 09:39:40 +03:00
BONNe
c8088f275d
Rework TryToComplete. (#109)
* Rework TryToComplete.

Implement ability to complete challenge multiple times at once.
To do it, I split everything in checking/removing/rewarding steps.

In checking step, it calculates if it is possible to complete with minimal requirements and then calculates maximal repeating factor.
In removing step, it removes everything that is necessary.
In rewarding step, it give rewards by necessary factor (multilayer).

I rework item/block/entity removing as factors may be influenced at the last element, so I improve everything by memory usage. Create necessary sets/lists/queues for faster access to already collected items.

* Add method that returns removed items, if somehow algorithm did not manage to remove all items.
Fix issue when removeItems method did not merge ItemStacks as they had different item amount.

Return and fix TryToCompleteTest.

* Implement Multiple Challenge Completion command and GUI. (#73)

/[gamemode] challenges complete [number] allows to complete challenges [number] amount (or less if not enough items)
Via GUI users can right click on challenge and if it is repeatable, then it will open AnvilGUI that accepts only numbers as input.
2019-05-06 12:10:02 +03:00
BONNe
bf801a67fc Disable TryToCompleteTest as it will fail now.
Need to review and fix this test, as TryToComplete now uses Item.isSimilar() method that is not working outside bukkit environment.
2019-04-24 09:02:11 +03:00
BONNe1704
7bb2ad09d3 Move TryToComplete from panel Package to tasks package. 2019-02-19 19:58:06 +02:00
BONNe1704
f9b941059e Remove Deprecated Classes. 2019-02-18 00:32:51 +02:00
BONNe1704
dba5a44461 Rename Challenges and ChallengeLevels classes. 2019-01-23 16:09:38 +02:00
BONNe1704
59c0f6bfea Deprecate all classes that are not necessary anymore. 2019-01-23 16:08:18 +02:00
Florian CUNY
4c3026f3c1 Version 0.3.0 (BentoBox 1.0) 2019-01-05 11:17:03 +01:00
Florian CUNY
8f51ddb634 Moved everything to world.bentobox.challenges package 2018-12-30 14:31:26 +01:00