-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first try of adding the alcatrazEscapee:mcjunitlib library for automa…
…ted testing
- Loading branch information
Showing
17 changed files
with
90 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,4 @@ run | |
|
||
# Files from Forge MDK | ||
forge*changelog.txt | ||
/.mixin.out/ |
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,8 @@ | ||
# Enable forge global version checking | ||
versionCheck = true | ||
# does the splashscreen run | ||
splashscreen = true | ||
defaultConfigPath = "defaultconfigs" | ||
# max threads for parallel loading : -1 uses Runtime#availableProcessors | ||
maxThreads = -1 | ||
|
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,3 @@ | ||
#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula). | ||
#Mon Jun 14 20:01:56 CEST 2021 | ||
eula=true |
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,33 @@ | ||
package cech12.ceramicbucket; | ||
|
||
import cech12.ceramicbucket.api.item.CeramicBucketItems; | ||
import com.alcatrazescapee.mcjunitlib.framework.IntegrationTest; | ||
import com.alcatrazescapee.mcjunitlib.framework.IntegrationTestClass; | ||
import com.alcatrazescapee.mcjunitlib.framework.IntegrationTestHelper; | ||
import net.minecraft.fluid.Fluids; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.tileentity.DispenserTileEntity; | ||
import net.minecraft.util.math.BlockPos; | ||
|
||
import java.util.Objects; | ||
|
||
@IntegrationTestClass("fluids") | ||
public class DispenserTests { | ||
|
||
@IntegrationTest("dispenser_water") | ||
public void testDispenserPlaceWater(IntegrationTestHelper helper) { | ||
helper.pushButton(new BlockPos(0, 1, 0)); | ||
helper.assertFluidAt(new BlockPos(1, 1, 1), Fluids.WATER, "Water should have been dispensed"); | ||
ItemStack dispenserItemStack = ((DispenserTileEntity) Objects.requireNonNull(helper.getTileEntity(new BlockPos(0, 1, 1)))).getStackInSlot(0); | ||
helper.assertTrue(() -> !dispenserItemStack.isEmpty() && dispenserItemStack.getItem() == CeramicBucketItems.CERAMIC_BUCKET, "Empty bucket should have been remain in dispenser"); | ||
} | ||
|
||
@IntegrationTest("dispenser_lava") | ||
public void testDispenserPlaceLava(IntegrationTestHelper helper) { | ||
helper.pushButton(new BlockPos(0, 1, 0)); | ||
helper.assertFluidAt(new BlockPos(1, 1, 1), Fluids.LAVA, "Lava should have been dispensed"); | ||
ItemStack dispenserItemStack = ((DispenserTileEntity) Objects.requireNonNull(helper.getTileEntity(new BlockPos(0, 1, 1)))).getStackInSlot(0); | ||
helper.assertTrue(dispenserItemStack::isEmpty, "No bucket should have been remain in dispenser"); | ||
} | ||
|
||
} |
Binary file added
BIN
+251 Bytes
src/test/resources/cech12/ceramicbucket/structures/cauldron_empty.nbt
Binary file not shown.
Binary file added
BIN
+251 Bytes
src/test/resources/cech12/ceramicbucket/structures/cauldron_water_full.nbt
Binary file not shown.
Binary file added
BIN
+251 Bytes
src/test/resources/cech12/ceramicbucket/structures/cauldron_water_one_third.nbt
Binary file not shown.
Binary file added
BIN
+251 Bytes
src/test/resources/cech12/ceramicbucket/structures/cauldron_water_two_thirds.nbt
Binary file not shown.
Binary file added
BIN
+366 Bytes
src/test/resources/cech12/ceramicbucket/structures/dispenser_empty.nbt
Binary file not shown.
Binary file added
BIN
+363 Bytes
src/test/resources/cech12/ceramicbucket/structures/dispenser_lava.nbt
Binary file not shown.
Binary file added
BIN
+372 Bytes
src/test/resources/cech12/ceramicbucket/structures/dispenser_milk.nbt
Binary file not shown.
Binary file added
BIN
+404 Bytes
src/test/resources/cech12/ceramicbucket/structures/dispenser_water.nbt
Binary file not shown.
Binary file not shown.