diff --git a/MekHQ/src/mekhq/campaign/personnel/enums/RandomDivorceMethod.java b/MekHQ/src/mekhq/campaign/personnel/enums/RandomDivorceMethod.java index db526631d2..c6b8551afe 100644 --- a/MekHQ/src/mekhq/campaign/personnel/enums/RandomDivorceMethod.java +++ b/MekHQ/src/mekhq/campaign/personnel/enums/RandomDivorceMethod.java @@ -26,8 +26,6 @@ import java.util.ResourceBundle; -import static megamek.client.ui.WrapLayout.wordWrap; - /** * An enumeration representing the available random divorce methods. *

@@ -60,7 +58,7 @@ public enum RandomDivorceMethod { final ResourceBundle resources = ResourceBundle.getBundle("mekhq.resources.Personnel", MekHQ.getMHQOptions().getLocale()); this.name = resources.getString(name); - this.toolTipText = wordWrap(resources.getString(toolTipText)); + this.toolTipText = resources.getString(toolTipText); } //endregion Constructors diff --git a/MekHQ/src/mekhq/campaign/personnel/enums/RandomProcreationMethod.java b/MekHQ/src/mekhq/campaign/personnel/enums/RandomProcreationMethod.java index 2cef0e7441..8d19f7ab31 100644 --- a/MekHQ/src/mekhq/campaign/personnel/enums/RandomProcreationMethod.java +++ b/MekHQ/src/mekhq/campaign/personnel/enums/RandomProcreationMethod.java @@ -26,8 +26,6 @@ import java.util.ResourceBundle; -import static megamek.client.ui.WrapLayout.wordWrap; - /** * The {@link RandomProcreationMethod} enum represents different methods of getting random procreation. *

@@ -58,7 +56,7 @@ public enum RandomProcreationMethod { final ResourceBundle resources = ResourceBundle.getBundle("mekhq.resources.Personnel", MekHQ.getMHQOptions().getLocale()); this.name = resources.getString(name); - this.toolTipText = wordWrap(resources.getString(toolTipText)); + this.toolTipText = resources.getString(toolTipText); } //endregion Constructors diff --git a/MekHQ/unittests/mekhq/campaign/personnel/enums/RandomDivorceMethodTest.java b/MekHQ/unittests/mekhq/campaign/personnel/enums/RandomDivorceMethodTest.java index f4fa738809..f2dce14d0f 100644 --- a/MekHQ/unittests/mekhq/campaign/personnel/enums/RandomDivorceMethodTest.java +++ b/MekHQ/unittests/mekhq/campaign/personnel/enums/RandomDivorceMethodTest.java @@ -26,7 +26,6 @@ import java.util.ResourceBundle; -import static megamek.client.ui.WrapLayout.wordWrap; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertInstanceOf; @@ -45,8 +44,8 @@ public class RandomDivorceMethodTest { //region Getters @Test public void testGetToolTipText() { - String expected = wordWrap(resources.getString("RandomDivorceMethod.NONE.toolTipText")).replaceAll("\\s", ""); - String actual = wordWrap(RandomDivorceMethod.NONE.getToolTipText().trim()).replaceAll("\\s", ""); + String expected = resources.getString("RandomDivorceMethod.NONE.toolTipText").replaceAll("\\s", ""); + String actual = RandomDivorceMethod.NONE.getToolTipText().trim().replaceAll("\\s", ""); assertEquals(expected, actual); } diff --git a/MekHQ/unittests/mekhq/campaign/personnel/enums/RandomMarriageMethodTest.java b/MekHQ/unittests/mekhq/campaign/personnel/enums/RandomMarriageMethodTest.java index 425bcdf869..3ca7dddd99 100644 --- a/MekHQ/unittests/mekhq/campaign/personnel/enums/RandomMarriageMethodTest.java +++ b/MekHQ/unittests/mekhq/campaign/personnel/enums/RandomMarriageMethodTest.java @@ -91,9 +91,9 @@ public void testGetMethod() { @Test public void testToStringOverride() { - assertEquals(wordWrap(resources.getString("RandomMarriageMethod.NONE.text")).trim(), + assertEquals(resources.getString("RandomMarriageMethod.NONE.text").trim(), RandomMarriageMethod.NONE.toString().trim()); - assertEquals(wordWrap(resources.getString("RandomMarriageMethod.DICE_ROLL.text")).trim(), + assertEquals(resources.getString("RandomMarriageMethod.DICE_ROLL.text").trim(), RandomMarriageMethod.DICE_ROLL.toString().trim()); } } diff --git a/MekHQ/unittests/mekhq/campaign/personnel/enums/RandomProcreationMethodTest.java b/MekHQ/unittests/mekhq/campaign/personnel/enums/RandomProcreationMethodTest.java index a3f93be194..a75940de66 100644 --- a/MekHQ/unittests/mekhq/campaign/personnel/enums/RandomProcreationMethodTest.java +++ b/MekHQ/unittests/mekhq/campaign/personnel/enums/RandomProcreationMethodTest.java @@ -44,10 +44,10 @@ public class RandomProcreationMethodTest { //region Getters @Test public void testGetToolTipText() { - assertEquals(resources.getString("RandomProcreationMethod.NONE.toolTipText").trim(), - RandomProcreationMethod.NONE.getToolTipText().trim()); - assertEquals(resources.getString("RandomProcreationMethod.DICE_ROLL.toolTipText").trim(), - RandomProcreationMethod.DICE_ROLL.getToolTipText().trim()); + assertEquals(resources.getString("RandomProcreationMethod.NONE.toolTipText"), + RandomProcreationMethod.NONE.getToolTipText()); + assertEquals(resources.getString("RandomProcreationMethod.DICE_ROLL.toolTipText"), + RandomProcreationMethod.DICE_ROLL.getToolTipText()); } //endregion Getters