From 2fa8df527a13c9600b66f1b457c65fe925e8f3e7 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Tue, 21 Jul 2020 17:09:00 +0200 Subject: [PATCH 01/17] Snapshot --- pom.xml | 2 +- src/changes/changes.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 564ef7c4..9730f620 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ com.bernardomg.tabletop dice - 2.0.4 + 2.1.0-SNAPSHOT jar Dice Notation Tools for Java diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 57325c07..b36c44c5 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -132,5 +132,7 @@ The parser's error listener is configurable. + + From c501a9945982e4b8e053ad62d640b4e5c0fbbf41 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Wed, 5 Aug 2020 17:33:55 +0200 Subject: [PATCH 02/17] Corrected link --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 9730f620..a97111a1 100644 --- a/pom.xml +++ b/pom.xml @@ -53,8 +53,8 @@ - Travis CI - https://travis-ci.org/Bernardo-MG/dice-notation-java + Github workflow + https://github.com/bernardo-mg/dice-notation-java/actions From 286b250a5d07d42ce1dcd1995a9584559d0a61d9 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sun, 30 Aug 2020 00:18:09 +0200 Subject: [PATCH 03/17] Updated workflow files --- .github/workflows/deploy.yml | 9 +++++---- .github/workflows/deploy_docs.yml | 15 ++++++++++----- .github/workflows/testing.yml | 5 +++-- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fc36c046..8219f8f3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,17 +15,18 @@ jobs: shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 + - name: Check-out + uses: actions/checkout@v2 + - name: Set up JDK uses: actions/setup-java@v1 with: java-version: 1.8 - name: Set up Maven settings - uses: bernardo-mg/deployment-maven-settings-action@master + uses: bernardo-mg/deployment-maven-settings-action@v1.1.0 with: version-type: ${{ steps.extract_branch.outputs.branch }} env: DEPLOY_USER: ${{ secrets.DEPLOY_USER }} DEPLOY_PASSWORD: ${{ secrets.DEPLOY_PASSWORD }} - name: Deploy - run: mvn deploy -B -P deployment --settings settings.xml + run: mvn deploy -B -P deployment,deployment-release --settings settings.xml diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 1a630fe7..3d689e1f 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -21,13 +21,14 @@ jobs: shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 + - name: Check-out + uses: actions/checkout@v2 + - name: Set up JDK uses: actions/setup-java@v1 with: java-version: 1.8 - name: Set up Maven settings - uses: bernardo-mg/deployment-maven-settings-action@master + uses: bernardo-mg/deployment-maven-settings-action@v1.1.0 with: version-type: ${{ steps.extract_branch.outputs.branch }} env: @@ -37,5 +38,9 @@ jobs: DEPLOY_DOCS_DEVELOP_PASSWORD: ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }} DEPLOY_DOCS_SITE: ${{ secrets.DEPLOY_DOCS_SITE }} DEPLOY_DOCS_DEVELOP_SITE: ${{ secrets.DEPLOY_DOCS_DEVELOP_SITE }} - - name: Deploy docs - run: mvn site site:deploy -B -P deployment --settings settings.xml + - name: Deploy development docs + if: steps.extract_branch.outputs.branch == 'develop' + run: mvn site site:deploy -B -P deployment,deployment-development --settings settings.xml + - name: Deploy release docs + if: steps.extract_branch.outputs.branch == 'master' + run: mvn site site:deploy -B -P deployment,deployment-release --settings settings.xml diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 38802ec3..dc3e1505 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -11,10 +11,11 @@ jobs: jdk: [ 8, 11, 14 ] steps: - - uses: actions/checkout@v2 + - name: Check-out + uses: actions/checkout@v2 - name: Set up JDK ${{ matrix.jdk }} uses: actions/setup-java@v1 with: java-version: ${{ matrix.jdk }} - - name: Runs tests + - name: Run all tests run: mvn clean verify From 0cbd495cf421526df939fb69d21c318484018ba5 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sun, 30 Aug 2020 00:27:29 +0200 Subject: [PATCH 04/17] Updated action --- .github/workflows/deploy.yml | 2 +- .github/workflows/deploy_docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8219f8f3..b12ebe12 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,7 +22,7 @@ jobs: with: java-version: 1.8 - name: Set up Maven settings - uses: bernardo-mg/deployment-maven-settings-action@v1.1.0 + uses: bernardo-mg/deployment-maven-settings-action@v1.1.1 with: version-type: ${{ steps.extract_branch.outputs.branch }} env: diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 3d689e1f..e86ddb63 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -28,7 +28,7 @@ jobs: with: java-version: 1.8 - name: Set up Maven settings - uses: bernardo-mg/deployment-maven-settings-action@v1.1.0 + uses: bernardo-mg/deployment-maven-settings-action@v1.1.1 with: version-type: ${{ steps.extract_branch.outputs.branch }} env: From ec320fc65689349b6cd7712f56cb316aa3c8f489 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sun, 30 Aug 2020 00:32:47 +0200 Subject: [PATCH 05/17] Updated action --- .github/workflows/deploy.yml | 2 +- .github/workflows/deploy_docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b12ebe12..d29351c7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,7 +22,7 @@ jobs: with: java-version: 1.8 - name: Set up Maven settings - uses: bernardo-mg/deployment-maven-settings-action@v1.1.1 + uses: bernardo-mg/deployment-maven-settings-action@v1.1.2 with: version-type: ${{ steps.extract_branch.outputs.branch }} env: diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index e86ddb63..b5f50844 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -28,7 +28,7 @@ jobs: with: java-version: 1.8 - name: Set up Maven settings - uses: bernardo-mg/deployment-maven-settings-action@v1.1.1 + uses: bernardo-mg/deployment-maven-settings-action@v1.1.2 with: version-type: ${{ steps.extract_branch.outputs.branch }} env: From 2fe4dc0a79c2af9b997f9b07e68e3c865bacd4c4 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Mon, 18 Jan 2021 20:58:11 +0100 Subject: [PATCH 06/17] Updated skin --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a97111a1..67e00871 100644 --- a/pom.xml +++ b/pom.xml @@ -228,7 +228,7 @@ - 2.0.8 + 2.0.10 https://bintray.com/bernardo-mg/tabletop-toolkits/dice/view http://mvnrepository.com/artifact/com.bernardomg.tabletop/dice From 7cd0933f403e02355af13aa8c3a87a21f66372ce Mon Sep 17 00:00:00 2001 From: Bernardo Date: Thu, 21 Jan 2021 23:17:39 +0100 Subject: [PATCH 07/17] Updated POM --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 67e00871..37dac558 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.bernardomg.maven base-pom - 1.3.4 + 1.3.5 From 3ed4b3ee5fe9e53068c61e5660c879814f96d0c8 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sat, 20 Feb 2021 12:12:40 +0100 Subject: [PATCH 08/17] Small changes to docs --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index f8bb2414..1790b254 100644 --- a/readme.md +++ b/readme.md @@ -53,7 +53,7 @@ Documentation is also generated from the latest snapshot, taken from the 'develo The documentation site sources come along the source code (as it is a Maven site), so it is always possible to generate them using the following Maven command: ``` -$ mvn verify site +mvn verify site ``` The verify phase is required, as otherwise some of the reports won't be created. @@ -73,7 +73,7 @@ The recommended way to install the project is by setting up your preferred depen If for some reason manual installation is necessary, just use the following Maven command: ``` -$ mvn install +mvn install ``` ### Usage example From a8728152f6c9a9d6bd577d0bedf3121366c7342d Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sat, 20 Feb 2021 12:16:55 +0100 Subject: [PATCH 09/17] Using better value conversion --- .../dice/ITParseAndDiceGatherer.java | 104 +++++++++--------- ...eAndDiceRollerAdditionDiceRollResults.java | 20 ++-- ...AndDiceRollerAdditionMixedRollResults.java | 28 ++--- ...ndDiceRollerAdditionNumberRollResults.java | 14 +-- ...eRollerBinaryOperationDiceRollResults.java | 26 ++--- ...ollerBinaryOperationNumberRollResults.java | 14 +-- .../ITParseAndDiceRollerDiceRollResults.java | 10 +- ...ceRollerMultiplicationDiceRollResults.java | 20 ++-- ...dDiceRollerParenthesisDiceRollResults.java | 24 ++-- ...dDiceRollerSubtractionDiceRollResults.java | 20 ++-- ...iceRollerSubtractionNumberRollResults.java | 14 +-- ...rseAndDiceRollerAdditionDiceTotalRoll.java | 8 +- ...eAndDiceRollerAdditionNumberTotalRoll.java | 6 +- ...ceRollerAdditionSignedNumberTotalRoll.java | 4 +- ...eRollerBinaryOperationNumberTotalRoll.java | 26 ++--- ...AndDiceRollerBinaryOperationTotalRoll.java | 4 +- .../ITParseAndDiceRollerDiceTotalRoll.java | 10 +- ...rseAndDiceRollerDivisionDiceTotalRoll.java | 6 +- ...eAndDiceRollerDivisionNumberTotalRoll.java | 4 +- ...DiceRollerMultiplicationDiceTotalRoll.java | 6 +- ...ceRollerMultiplicationNumberTotalRoll.java | 2 +- .../ITParseAndDiceRollerNumberTotalRoll.java | 6 +- ...arseAndDiceRollerParenthesisTotalRoll.java | 4 +- ...ndDiceRollerSubstractionDiceTotalRoll.java | 8 +- ...DiceRollerSubstractionNumberTotalRoll.java | 10 +- .../ITDefaultDiceParserDiceStructure.java | 32 +++--- ...TDefaultDiceParserSignedDiceStructure.java | 8 +- ...efaultDiceParserSignedNumberStructure.java | 4 +- ...DiceRollerAdditionOperationRollResult.java | 12 +- .../TestDiceRollerConstantRollResult.java | 12 +- .../results/TestDiceRollerDiceRollResult.java | 24 ++-- .../TestDiceRollerAdditionOperationValue.java | 16 +-- .../roller/value/TestDiceRollerDiceValue.java | 14 +-- .../TestDiceRollerDivisionOperationValue.java | 14 +-- ...iceRollerMultiplicationOperationValue.java | 16 +-- ...stDiceRollerSubtractionOperationValue.java | 18 +-- .../traverser/TestInorderTraverser.java | 6 +- .../traverser/TestPostorderTraverser.java | 6 +- .../traverser/TestPreorderTraverser.java | 6 +- .../test/unit/roll/TestDiceToRollResult.java | 12 +- 40 files changed, 299 insertions(+), 299 deletions(-) diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/dice/ITParseAndDiceGatherer.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/dice/ITParseAndDiceGatherer.java index 774b7e71..01b4a7c8 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/dice/ITParseAndDiceGatherer.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/dice/ITParseAndDiceGatherer.java @@ -54,13 +54,13 @@ public final void testParse_Addition() { dice = itr.next(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(20), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(20), dice.getSides()); dice = itr.next(); - Assertions.assertEquals(new Integer(2), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(2), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); } @Test @@ -81,23 +81,23 @@ public final void testParse_Complex_ReturnsAll() { dice = itr.next(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(20), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(20), dice.getSides()); dice = itr.next(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(8), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(8), dice.getSides()); dice = itr.next(); - Assertions.assertEquals(new Integer(2), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(2), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); dice = itr.next(); - Assertions.assertEquals(new Integer(3), dice.getQuantity()); - Assertions.assertEquals(new Integer(12), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(3), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(12), dice.getSides()); } @Test @@ -118,28 +118,28 @@ public final void testParse_Long_ReturnsAll() { dice = itr.next(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(20), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(20), dice.getSides()); dice = itr.next(); - Assertions.assertEquals(new Integer(2), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(2), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); dice = itr.next(); - Assertions.assertEquals(new Integer(-1), dice.getQuantity()); - Assertions.assertEquals(new Integer(12), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(-1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(12), dice.getSides()); dice = itr.next(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); dice = itr.next(); - Assertions.assertEquals(new Integer(2), dice.getQuantity()); - Assertions.assertEquals(new Integer(8), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(2), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(8), dice.getSides()); } @Test @@ -153,9 +153,9 @@ public final void testParse_Max() { dice = new DiceGatherer().transform(parsed).iterator().next(); - Assertions.assertEquals(new Integer(Integer.MAX_VALUE), + Assertions.assertEquals(Integer.valueOf(Integer.MAX_VALUE), dice.getQuantity()); - Assertions.assertEquals(new Integer(Integer.MAX_VALUE), + Assertions.assertEquals(Integer.valueOf(Integer.MAX_VALUE), dice.getSides()); } @@ -169,8 +169,8 @@ public final void testParse_Negative() { dice = new DiceGatherer().transform(parsed).iterator().next(); - Assertions.assertEquals(new Integer(-1), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(-1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); } @Test @@ -196,8 +196,8 @@ public final void testParse_OnesDice_Minimal() { dice = new DiceGatherer().transform(parsed).iterator().next(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); } @Test @@ -210,8 +210,8 @@ public final void testParse_Simple() { dice = new DiceGatherer().transform(parsed).iterator().next(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); } @Test @@ -232,13 +232,13 @@ public final void testParse_Subtraction() { dice = itr.next(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); dice = itr.next(); - Assertions.assertEquals(new Integer(-2), dice.getQuantity()); - Assertions.assertEquals(new Integer(12), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(-2), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(12), dice.getSides()); } @Test @@ -259,18 +259,18 @@ public final void testParse_SubtractionAddition() { dice = itr.next(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); dice = itr.next(); - Assertions.assertEquals(new Integer(-2), dice.getQuantity()); - Assertions.assertEquals(new Integer(8), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(-2), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(8), dice.getSides()); dice = itr.next(); - Assertions.assertEquals(new Integer(3), dice.getQuantity()); - Assertions.assertEquals(new Integer(10), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(3), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(10), dice.getSides()); } @Test @@ -291,18 +291,18 @@ public final void testParse_SubtractionAddition_Dice_AllEqual() { dice = itr.next(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); dice = itr.next(); - Assertions.assertEquals(new Integer(-1), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(-1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); dice = itr.next(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); } @Test @@ -323,13 +323,13 @@ public final void testParse_WithConstants() { dice = itr.next(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); dice = itr.next(); - Assertions.assertEquals(new Integer(3), dice.getQuantity()); - Assertions.assertEquals(new Integer(10), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(3), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(10), dice.getSides()); } @Test @@ -342,8 +342,8 @@ public final void testParse_ZeroQuantity() { dice = new DiceGatherer().transform(parsed).iterator().next(); - Assertions.assertEquals(new Integer(0), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(0), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerAdditionDiceRollResults.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerAdditionDiceRollResults.java index d097c600..1dbc5703 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerAdditionDiceRollResults.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerAdditionDiceRollResults.java @@ -56,14 +56,14 @@ public final void testParse_Dice() { result = rolled.next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); result = rolled.next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(2), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(2), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); } @Test @@ -102,14 +102,14 @@ public final void testParse_Rolls() { rolls = result.getAllRolls().iterator(); Assertions.assertEquals(1, Iterables.size(result.getAllRolls())); - Assertions.assertEquals(new Integer(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); result = rolled.next(); rolls = result.getAllRolls().iterator(); Assertions.assertEquals(2, Iterables.size(result.getAllRolls())); - Assertions.assertEquals(new Integer(1), rolls.next()); - Assertions.assertEquals(new Integer(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); } @Test @@ -125,7 +125,7 @@ public final void testParse_TotalRoll() { history = new DiceRoller().transform(expression); - Assertions.assertEquals(new Integer(3), history.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(3), history.getTotalRoll()); } @Test @@ -145,11 +145,11 @@ public final void testParse_TotalRolls() { result = rolled.next(); - Assertions.assertEquals(new Integer(1), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(1), result.getTotalRoll()); result = rolled.next(); - Assertions.assertEquals(new Integer(2), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(2), result.getTotalRoll()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerAdditionMixedRollResults.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerAdditionMixedRollResults.java index 93b5079f..129cd4c1 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerAdditionMixedRollResults.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerAdditionMixedRollResults.java @@ -59,20 +59,20 @@ public final void testParse_Dice() { result = rolled.next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); result = rolled.next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(3), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(3), dice.getSides()); result = rolled.next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(2), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(2), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); } @Test @@ -111,20 +111,20 @@ public final void testParse_Rolls() { rolls = result.getAllRolls().iterator(); Assertions.assertEquals(1, Iterables.size(result.getAllRolls())); - Assertions.assertEquals(new Integer(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); result = rolled.next(); rolls = result.getAllRolls().iterator(); Assertions.assertEquals(1, Iterables.size(result.getAllRolls())); - Assertions.assertEquals(new Integer(3), rolls.next()); + Assertions.assertEquals(Integer.valueOf(3), rolls.next()); result = rolled.next(); rolls = result.getAllRolls().iterator(); Assertions.assertEquals(2, Iterables.size(result.getAllRolls())); - Assertions.assertEquals(new Integer(1), rolls.next()); - Assertions.assertEquals(new Integer(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); } @Test @@ -140,7 +140,7 @@ public final void testParse_TotalRoll() { history = new DiceRoller().transform(expression); - Assertions.assertEquals(new Integer(6), history.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(6), history.getTotalRoll()); } @Test @@ -160,15 +160,15 @@ public final void testParse_TotalRolls() { result = rolled.next(); - Assertions.assertEquals(new Integer(1), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(1), result.getTotalRoll()); result = rolled.next(); - Assertions.assertEquals(new Integer(3), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(3), result.getTotalRoll()); result = rolled.next(); - Assertions.assertEquals(new Integer(2), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(2), result.getTotalRoll()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerAdditionNumberRollResults.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerAdditionNumberRollResults.java index 4699cfb0..8aeb4d22 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerAdditionNumberRollResults.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerAdditionNumberRollResults.java @@ -68,7 +68,7 @@ public final void testParse_TotalRoll() { history = new DiceRoller().transform(expression); - Assertions.assertEquals(new Integer(6), history.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(6), history.getTotalRoll()); } @Test @@ -88,15 +88,15 @@ public final void testParse_TotalRolls() { result = rolled.next(); - Assertions.assertEquals(new Integer(1), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(1), result.getTotalRoll()); result = rolled.next(); - Assertions.assertEquals(new Integer(2), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(2), result.getTotalRoll()); result = rolled.next(); - Assertions.assertEquals(new Integer(3), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(3), result.getTotalRoll()); } @Test @@ -122,21 +122,21 @@ public final void testParse_Value() { Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(1), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(1), rollValues.next()); result = resultsItr.next(); rolls = result.getAllRolls(); Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(2), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(2), rollValues.next()); result = resultsItr.next(); rolls = result.getAllRolls(); Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(3), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(3), rollValues.next()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerBinaryOperationDiceRollResults.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerBinaryOperationDiceRollResults.java index 6c973155..07db1c92 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerBinaryOperationDiceRollResults.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerBinaryOperationDiceRollResults.java @@ -59,20 +59,20 @@ public final void testParse_Dice() { result = rolled.next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); result = rolled.next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(2), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(2), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); result = rolled.next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(3), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(3), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); } @Test @@ -111,14 +111,14 @@ public final void testParse_Rolls() { rolls = result.getAllRolls().iterator(); Assertions.assertEquals(1, Iterables.size(result.getAllRolls())); - Assertions.assertEquals(new Integer(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); result = rolled.next(); rolls = result.getAllRolls().iterator(); Assertions.assertEquals(2, Iterables.size(result.getAllRolls())); - Assertions.assertEquals(new Integer(1), rolls.next()); - Assertions.assertEquals(new Integer(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); } @Test @@ -134,7 +134,7 @@ public final void testParse_TotalRoll() { history = new DiceRoller().transform(expression); - Assertions.assertEquals(new Integer(7), history.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(7), history.getTotalRoll()); } @Test @@ -154,15 +154,15 @@ public final void testParse_TotalRolls() { result = rolled.next(); - Assertions.assertEquals(new Integer(1), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(1), result.getTotalRoll()); result = rolled.next(); - Assertions.assertEquals(new Integer(2), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(2), result.getTotalRoll()); result = rolled.next(); - Assertions.assertEquals(new Integer(3), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(3), result.getTotalRoll()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerBinaryOperationNumberRollResults.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerBinaryOperationNumberRollResults.java index 465e1bdf..c4fd736b 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerBinaryOperationNumberRollResults.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerBinaryOperationNumberRollResults.java @@ -68,7 +68,7 @@ public final void testParse_TotalRoll() { history = new DiceRoller().transform(expression); - Assertions.assertEquals(new Integer(2), history.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(2), history.getTotalRoll()); } @Test @@ -88,15 +88,15 @@ public final void testParse_TotalRolls() { result = rolled.next(); - Assertions.assertEquals(new Integer(1), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(1), result.getTotalRoll()); result = rolled.next(); - Assertions.assertEquals(new Integer(-2), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(-2), result.getTotalRoll()); result = rolled.next(); - Assertions.assertEquals(new Integer(3), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(3), result.getTotalRoll()); } @Test @@ -122,21 +122,21 @@ public final void testParse_Value() { Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(1), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(1), rollValues.next()); result = resultsItr.next(); rolls = result.getAllRolls(); Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(-2), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(-2), rollValues.next()); result = resultsItr.next(); rolls = result.getAllRolls(); Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(3), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(3), rollValues.next()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerDiceRollResults.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerDiceRollResults.java index a6fc7208..5b0e71d2 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerDiceRollResults.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerDiceRollResults.java @@ -51,8 +51,8 @@ public final void testParse_SmallestDice_Dice() { .iterator().next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); } @Test @@ -88,7 +88,7 @@ public final void testParse_SmallestDice_Rolls() { rolls = result.getAllRolls(); Assertions.assertEquals(1, Iterables.size(rolls)); - Assertions.assertEquals(new Integer(1), rolls.iterator().next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.iterator().next()); } @Test @@ -104,7 +104,7 @@ public final void testParse_SmallestDice_TotalRoll() { history = new DiceRoller().transform(expression); - Assertions.assertEquals(new Integer(1), history.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(1), history.getTotalRoll()); } @Test @@ -121,7 +121,7 @@ public final void testParse_SmallestDice_TotalRolls() { result = new DiceRoller().transform(expression).getRollResults() .iterator().next(); - Assertions.assertEquals(new Integer(1), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(1), result.getTotalRoll()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerMultiplicationDiceRollResults.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerMultiplicationDiceRollResults.java index de236427..3f7a8451 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerMultiplicationDiceRollResults.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerMultiplicationDiceRollResults.java @@ -59,14 +59,14 @@ public final void testParse_Dice() { result = rolled.next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); result = rolled.next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(2), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(2), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); } @Test @@ -105,14 +105,14 @@ public final void testParse_Rolls() { rolls = result.getAllRolls().iterator(); Assertions.assertEquals(1, Iterables.size(result.getAllRolls())); - Assertions.assertEquals(new Integer(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); result = rolled.next(); rolls = result.getAllRolls().iterator(); Assertions.assertEquals(2, Iterables.size(result.getAllRolls())); - Assertions.assertEquals(new Integer(1), rolls.next()); - Assertions.assertEquals(new Integer(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); } @Test @@ -128,7 +128,7 @@ public final void testParse_TotalRoll() { history = new DiceRoller().transform(expression); - Assertions.assertEquals(new Integer(2), history.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(2), history.getTotalRoll()); } @Test @@ -148,11 +148,11 @@ public final void testParse_TotalRolls() { result = rolled.next(); - Assertions.assertEquals(new Integer(1), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(1), result.getTotalRoll()); result = rolled.next(); - Assertions.assertEquals(new Integer(2), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(2), result.getTotalRoll()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerParenthesisDiceRollResults.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerParenthesisDiceRollResults.java index 6fcaa5ad..6366fd71 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerParenthesisDiceRollResults.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerParenthesisDiceRollResults.java @@ -56,20 +56,20 @@ public final void testParse_Dice() { result = rolled.next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); result = rolled.next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(2), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(2), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); result = rolled.next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(3), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(3), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); } @Test @@ -108,14 +108,14 @@ public final void testParse_Rolls() { rolls = result.getAllRolls().iterator(); Assertions.assertEquals(1, Iterables.size(result.getAllRolls())); - Assertions.assertEquals(new Integer(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); result = rolled.next(); rolls = result.getAllRolls().iterator(); Assertions.assertEquals(2, Iterables.size(result.getAllRolls())); - Assertions.assertEquals(new Integer(1), rolls.next()); - Assertions.assertEquals(new Integer(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); } @Test @@ -131,7 +131,7 @@ public final void testParse_TotalRoll() { history = new DiceRoller().transform(expression); - Assertions.assertEquals(new Integer(9), history.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(9), history.getTotalRoll()); } @Test @@ -151,11 +151,11 @@ public final void testParse_TotalRolls() { result = rolled.next(); - Assertions.assertEquals(new Integer(1), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(1), result.getTotalRoll()); result = rolled.next(); - Assertions.assertEquals(new Integer(2), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(2), result.getTotalRoll()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerSubtractionDiceRollResults.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerSubtractionDiceRollResults.java index 794a8c93..f92102df 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerSubtractionDiceRollResults.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerSubtractionDiceRollResults.java @@ -56,14 +56,14 @@ public final void testParse_Dice() { result = rolled.next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); result = rolled.next(); dice = result.getDice(); - Assertions.assertEquals(new Integer(2), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(2), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); } @Test @@ -102,14 +102,14 @@ public final void testParse_Rolls() { rolls = result.getAllRolls().iterator(); Assertions.assertEquals(1, Iterables.size(result.getAllRolls())); - Assertions.assertEquals(new Integer(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); result = rolled.next(); rolls = result.getAllRolls().iterator(); Assertions.assertEquals(2, Iterables.size(result.getAllRolls())); - Assertions.assertEquals(new Integer(1), rolls.next()); - Assertions.assertEquals(new Integer(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); } @Test @@ -125,7 +125,7 @@ public final void testParse_TotalRoll() { history = new DiceRoller().transform(expression); - Assertions.assertEquals(new Integer(-1), history.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(-1), history.getTotalRoll()); } @Test @@ -145,11 +145,11 @@ public final void testParse_TotalRolls() { result = rolled.next(); - Assertions.assertEquals(new Integer(1), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(1), result.getTotalRoll()); result = rolled.next(); - Assertions.assertEquals(new Integer(2), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(2), result.getTotalRoll()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerSubtractionNumberRollResults.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerSubtractionNumberRollResults.java index 06b0a04a..ade9a180 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerSubtractionNumberRollResults.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/results/ITParseAndDiceRollerSubtractionNumberRollResults.java @@ -68,7 +68,7 @@ public final void testParse_TotalRoll() { history = new DiceRoller().transform(expression); - Assertions.assertEquals(new Integer(-6), history.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(-6), history.getTotalRoll()); } @Test @@ -88,15 +88,15 @@ public final void testParse_TotalRolls() { result = rolled.next(); - Assertions.assertEquals(new Integer(-1), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(-1), result.getTotalRoll()); result = rolled.next(); - Assertions.assertEquals(new Integer(-2), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(-2), result.getTotalRoll()); result = rolled.next(); - Assertions.assertEquals(new Integer(-3), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(-3), result.getTotalRoll()); } @Test @@ -124,21 +124,21 @@ public final void testParse_Value() { Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(-1), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(-1), rollValues.next()); result = resultsItr.next(); rolls = result.getAllRolls(); Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(-2), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(-2), rollValues.next()); result = resultsItr.next(); rolls = result.getAllRolls(); Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(-3), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(-3), rollValues.next()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerAdditionDiceTotalRoll.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerAdditionDiceTotalRoll.java index a5e73938..5667c295 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerAdditionDiceTotalRoll.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerAdditionDiceTotalRoll.java @@ -47,7 +47,7 @@ public final void testParse_Add_Dice_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(3), result); + Assertions.assertEquals(Integer.valueOf(3), result); } @Test @@ -63,7 +63,7 @@ public final void testParse_Add_LeftNumber_NoQuantity_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(6), result); + Assertions.assertEquals(Integer.valueOf(6), result); } @Test @@ -79,7 +79,7 @@ public final void testParse_Add_LeftNumber_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(7), result); + Assertions.assertEquals(Integer.valueOf(7), result); } @Test @@ -95,7 +95,7 @@ public final void testParse_Add_RightNumber_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(7), result); + Assertions.assertEquals(Integer.valueOf(7), result); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerAdditionNumberTotalRoll.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerAdditionNumberTotalRoll.java index bb7ab9fe..b8de6cba 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerAdditionNumberTotalRoll.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerAdditionNumberTotalRoll.java @@ -44,7 +44,7 @@ public final void testParse_Number_Add_Long_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(6), result); + Assertions.assertEquals(Integer.valueOf(6), result); } @Test @@ -60,7 +60,7 @@ public final void testParse_Number_Add_Longer_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(15), result); + Assertions.assertEquals(Integer.valueOf(15), result); } @Test @@ -76,7 +76,7 @@ public final void testParse_Number_Add_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(3), result); + Assertions.assertEquals(Integer.valueOf(3), result); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerAdditionSignedNumberTotalRoll.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerAdditionSignedNumberTotalRoll.java index c94351bb..047bf9e5 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerAdditionSignedNumberTotalRoll.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerAdditionSignedNumberTotalRoll.java @@ -47,7 +47,7 @@ public final void testParse_Number_AddNegative_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer((-1)), result); + Assertions.assertEquals(Integer.valueOf((-1)), result); } @Test @@ -63,7 +63,7 @@ public final void testParse_Number_AddToNegative_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(1), result); + Assertions.assertEquals(Integer.valueOf(1), result); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerBinaryOperationNumberTotalRoll.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerBinaryOperationNumberTotalRoll.java index 0fdca48f..d56d08db 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerBinaryOperationNumberTotalRoll.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerBinaryOperationNumberTotalRoll.java @@ -47,7 +47,7 @@ public final void testParse_AddAndMult_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(7), result); + Assertions.assertEquals(Integer.valueOf(7), result); } @Test @@ -63,7 +63,7 @@ public final void testParse_AddAndSub_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(0), result); + Assertions.assertEquals(Integer.valueOf(0), result); } @Test @@ -79,7 +79,7 @@ public final void testParse_AddNegAndSub_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(-4), result); + Assertions.assertEquals(Integer.valueOf(-4), result); } @Test @@ -95,7 +95,7 @@ public final void testParse_DivAndAdd_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(4), result); + Assertions.assertEquals(Integer.valueOf(4), result); } @Test @@ -111,7 +111,7 @@ public final void testParse_DivAndSub_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(-1), result); + Assertions.assertEquals(Integer.valueOf(-1), result); } @Test @@ -127,7 +127,7 @@ public final void testParse_MultAndAdd_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(8), result); + Assertions.assertEquals(Integer.valueOf(8), result); } @Test @@ -143,7 +143,7 @@ public final void testParse_MultAndDiv_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(4), result); + Assertions.assertEquals(Integer.valueOf(4), result); } @Test @@ -159,7 +159,7 @@ public final void testParse_MultAndSub_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(3), result); + Assertions.assertEquals(Integer.valueOf(3), result); } @Test @@ -175,7 +175,7 @@ public final void testParse_SubAndAdd_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(4), result); + Assertions.assertEquals(Integer.valueOf(4), result); } @Test @@ -191,7 +191,7 @@ public final void testParse_SubAndDiv_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(-2), result); + Assertions.assertEquals(Integer.valueOf(-2), result); } @Test @@ -207,7 +207,7 @@ public final void testParse_SubAndMult_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(-5), result); + Assertions.assertEquals(Integer.valueOf(-5), result); } @Test @@ -223,7 +223,7 @@ public final void testParse_SubNegAndAdd_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(6), result); + Assertions.assertEquals(Integer.valueOf(6), result); } @Test @@ -239,7 +239,7 @@ public final void testParse_SubNegAndAddNeg_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(2), result); + Assertions.assertEquals(Integer.valueOf(2), result); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerBinaryOperationTotalRoll.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerBinaryOperationTotalRoll.java index d78a9642..167ceade 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerBinaryOperationTotalRoll.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerBinaryOperationTotalRoll.java @@ -44,7 +44,7 @@ public final void testParse_LongAddition_NoQuantity() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(18), result); + Assertions.assertEquals(Integer.valueOf(18), result); } @Test @@ -57,7 +57,7 @@ public final void testParse_LongArithmetic() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(7), result); + Assertions.assertEquals(Integer.valueOf(7), result); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerDiceTotalRoll.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerDiceTotalRoll.java index 71332c6e..12a3d39f 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerDiceTotalRoll.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerDiceTotalRoll.java @@ -61,7 +61,7 @@ public final void testParse_Dice_Negative_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer((-1)), result); + Assertions.assertEquals(Integer.valueOf((-1)), result); } @Test @@ -77,7 +77,7 @@ public final void testParse_Dice_NoQuantity_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(1), result); + Assertions.assertEquals(Integer.valueOf(1), result); } @Test @@ -93,7 +93,7 @@ public final void testParse_Dice_NoSides_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(0), result); + Assertions.assertEquals(Integer.valueOf(0), result); } @Test @@ -109,7 +109,7 @@ public final void testParse_Dice_Smallest_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(1), result); + Assertions.assertEquals(Integer.valueOf(1), result); } @Test @@ -125,7 +125,7 @@ public final void testParse_Dice_ZeroQuantity_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(0), result); + Assertions.assertEquals(Integer.valueOf(0), result); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerDivisionDiceTotalRoll.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerDivisionDiceTotalRoll.java index 83163178..c3ef1fc1 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerDivisionDiceTotalRoll.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerDivisionDiceTotalRoll.java @@ -47,7 +47,7 @@ public final void testParse_Division_Dice_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(3), result); + Assertions.assertEquals(Integer.valueOf(3), result); } @Test @@ -63,7 +63,7 @@ public final void testParse_Division_LeftNumber_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(5), result); + Assertions.assertEquals(Integer.valueOf(5), result); } @Test @@ -79,7 +79,7 @@ public final void testParse_Division_RightNumber_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(10), result); + Assertions.assertEquals(Integer.valueOf(10), result); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerDivisionNumberTotalRoll.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerDivisionNumberTotalRoll.java index 59f6e59e..4728e331 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerDivisionNumberTotalRoll.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerDivisionNumberTotalRoll.java @@ -46,7 +46,7 @@ public final void testParse_Division_FloatValue() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Float(1.5), result); + Assertions.assertEquals(Float.valueOf(1.5f), result); } @Test @@ -62,7 +62,7 @@ public final void testParse_Division_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(2), result); + Assertions.assertEquals(Integer.valueOf(2), result); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerMultiplicationDiceTotalRoll.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerMultiplicationDiceTotalRoll.java index 3f6e465b..2f6465fe 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerMultiplicationDiceTotalRoll.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerMultiplicationDiceTotalRoll.java @@ -44,7 +44,7 @@ public final void testParse_Multiply_Dice_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(6), result); + Assertions.assertEquals(Integer.valueOf(6), result); } @Test @@ -60,7 +60,7 @@ public final void testParse_Multiply_LeftNumber_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(10), result); + Assertions.assertEquals(Integer.valueOf(10), result); } @Test @@ -76,7 +76,7 @@ public final void testParse_Multiply_RightNumber_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(10), result); + Assertions.assertEquals(Integer.valueOf(10), result); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerMultiplicationNumberTotalRoll.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerMultiplicationNumberTotalRoll.java index 402629c3..11691117 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerMultiplicationNumberTotalRoll.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerMultiplicationNumberTotalRoll.java @@ -44,7 +44,7 @@ public final void testParse_multiplication_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(2), result); + Assertions.assertEquals(Integer.valueOf(2), result); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerNumberTotalRoll.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerNumberTotalRoll.java index d0e2d087..4e26dada 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerNumberTotalRoll.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerNumberTotalRoll.java @@ -44,7 +44,7 @@ public final void testParse_Number() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(12), result); + Assertions.assertEquals(Integer.valueOf(12), result); } @Test @@ -60,7 +60,7 @@ public final void testParse_Number_Negative() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(-12), result); + Assertions.assertEquals(Integer.valueOf(-12), result); } @Test @@ -76,7 +76,7 @@ public final void testParse_Number_ZeroPadding() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(1200), result); + Assertions.assertEquals(Integer.valueOf(1200), result); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerParenthesisTotalRoll.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerParenthesisTotalRoll.java index 9de7ec5b..2415aa5d 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerParenthesisTotalRoll.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerParenthesisTotalRoll.java @@ -44,7 +44,7 @@ public final void testParse_AddAndMult_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(9), result); + Assertions.assertEquals(Integer.valueOf(9), result); } @Test @@ -60,7 +60,7 @@ public final void testParse_Number_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(1), result); + Assertions.assertEquals(Integer.valueOf(1), result); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerSubstractionDiceTotalRoll.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerSubstractionDiceTotalRoll.java index 08824e3b..fdb4fa5f 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerSubstractionDiceTotalRoll.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerSubstractionDiceTotalRoll.java @@ -44,7 +44,7 @@ public final void testParse_Sub_Dice_Negative_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(-3), result); + Assertions.assertEquals(Integer.valueOf(-3), result); } @Test @@ -60,7 +60,7 @@ public final void testParse_Sub_Dice_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(-1), result); + Assertions.assertEquals(Integer.valueOf(-1), result); } @Test @@ -76,7 +76,7 @@ public final void testParse_Sub_LeftNumber_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(3), result); + Assertions.assertEquals(Integer.valueOf(3), result); } @Test @@ -92,7 +92,7 @@ public final void testParse_Sub_RightNumber_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(-3), result); + Assertions.assertEquals(Integer.valueOf(-3), result); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerSubstractionNumberTotalRoll.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerSubstractionNumberTotalRoll.java index 0c6dc468..fea068bb 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerSubstractionNumberTotalRoll.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/interpreter/roll/value/ITParseAndDiceRollerSubstractionNumberTotalRoll.java @@ -44,7 +44,7 @@ public final void testParse_Number_Sub_Long_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(-4), result); + Assertions.assertEquals(Integer.valueOf(-4), result); } @Test @@ -60,7 +60,7 @@ public final void testParse_Number_Sub_Longer_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(-13), result); + Assertions.assertEquals(Integer.valueOf(-13), result); } @Test @@ -76,7 +76,7 @@ public final void testParse_Number_Sub_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(-1), result); + Assertions.assertEquals(Integer.valueOf(-1), result); } @Test @@ -92,7 +92,7 @@ public final void testParse_Number_SubNeg_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(3), result); + Assertions.assertEquals(Integer.valueOf(3), result); } @Test @@ -108,7 +108,7 @@ public final void testParse_Number_SubToNegative_Value() { result = new DiceRoller().transform(parsed).getTotalRoll(); - Assertions.assertEquals(new Integer(-3), result); + Assertions.assertEquals(Integer.valueOf(-3), result); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/parser/structure/ITDefaultDiceParserDiceStructure.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/parser/structure/ITDefaultDiceParserDiceStructure.java index 72c4ea22..ed238bf0 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/parser/structure/ITDefaultDiceParserDiceStructure.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/parser/structure/ITDefaultDiceParserDiceStructure.java @@ -43,9 +43,9 @@ public final void testParse_Max() { dice = ((DiceOperand) parsed).getDice(); - Assertions.assertEquals(new Integer(Integer.MAX_VALUE), + Assertions.assertEquals(Integer.valueOf(Integer.MAX_VALUE), dice.getQuantity()); - Assertions.assertEquals(new Integer(Integer.MAX_VALUE), + Assertions.assertEquals(Integer.valueOf(Integer.MAX_VALUE), dice.getSides()); } @@ -59,8 +59,8 @@ public final void testParse_Negative() { dice = ((DiceOperand) parsed).getDice(); - Assertions.assertEquals(new Integer((-1)), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf((-1)), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); } @Test @@ -73,8 +73,8 @@ public final void testParse_OnesDice() { dice = ((DiceOperand) parsed).getDice(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(1), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), dice.getSides()); } @Test @@ -87,8 +87,8 @@ public final void testParse_Simple() { dice = ((DiceOperand) parsed).getDice(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); } @Test @@ -101,8 +101,8 @@ public final void testParse_Simple_BigD() { dice = ((DiceOperand) parsed).getDice(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); } @Test @@ -115,8 +115,8 @@ public final void testParse_Simple_NoQuantity() { dice = ((DiceOperand) parsed).getDice(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); } @Test @@ -129,8 +129,8 @@ public final void testParse_ZeroQuantity() { dice = ((DiceOperand) parsed).getDice(); - Assertions.assertEquals(new Integer(0), dice.getQuantity()); - Assertions.assertEquals(new Integer(6), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(0), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(6), dice.getSides()); } @Test @@ -143,8 +143,8 @@ public final void testParse_ZeroSides() { dice = ((DiceOperand) parsed).getDice(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(0), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(0), dice.getSides()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/parser/structure/ITDefaultDiceParserSignedDiceStructure.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/parser/structure/ITDefaultDiceParserSignedDiceStructure.java index f194b969..53455dfd 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/parser/structure/ITDefaultDiceParserSignedDiceStructure.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/parser/structure/ITDefaultDiceParserSignedDiceStructure.java @@ -40,9 +40,9 @@ public final void testParse_OnesDice_SignedNegative() { operation = (DiceOperand) new DefaultDiceParser().parse("-1d1"); - Assertions.assertEquals(new Integer(-1), + Assertions.assertEquals(Integer.valueOf(-1), operation.getDice().getQuantity()); - Assertions.assertEquals(new Integer(1), operation.getDice().getSides()); + Assertions.assertEquals(Integer.valueOf(1), operation.getDice().getSides()); } @Test @@ -52,9 +52,9 @@ public final void testParse_OnesDice_SignedPositive() { operation = (DiceOperand) new DefaultDiceParser().parse("+1d1"); - Assertions.assertEquals(new Integer(1), + Assertions.assertEquals(Integer.valueOf(1), operation.getDice().getQuantity()); - Assertions.assertEquals(new Integer(1), operation.getDice().getSides()); + Assertions.assertEquals(Integer.valueOf(1), operation.getDice().getSides()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/integration/parser/structure/ITDefaultDiceParserSignedNumberStructure.java b/src/test/java/com/bernardomg/tabletop/dice/test/integration/parser/structure/ITDefaultDiceParserSignedNumberStructure.java index f2dc51d6..352f75ec 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/integration/parser/structure/ITDefaultDiceParserSignedNumberStructure.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/integration/parser/structure/ITDefaultDiceParserSignedNumberStructure.java @@ -40,7 +40,7 @@ public final void testParse_Negative() { operation = (IntegerOperand) new DefaultDiceParser().parse("-12"); - Assertions.assertEquals(new Integer(0 - 12), operation.getValue()); + Assertions.assertEquals(Integer.valueOf(0 - 12), operation.getValue()); } @Test @@ -50,7 +50,7 @@ public final void testParse_Positive() { operation = (IntegerOperand) new DefaultDiceParser().parse("+12"); - Assertions.assertEquals(new Integer(12), operation.getValue()); + Assertions.assertEquals(Integer.valueOf(12), operation.getValue()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/results/TestDiceRollerAdditionOperationRollResult.java b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/results/TestDiceRollerAdditionOperationRollResult.java index 34b1919b..7a164324 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/results/TestDiceRollerAdditionOperationRollResult.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/results/TestDiceRollerAdditionOperationRollResult.java @@ -65,14 +65,14 @@ public final void testRolls_Addition() { Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(1), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(1), rollValues.next()); result = resultsItr.next(); rolls = result.getAllRolls(); Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(2), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(2), rollValues.next()); } @Test @@ -103,14 +103,14 @@ public final void testRolls_Addition_AddToNeg() { Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(-1), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(-1), rollValues.next()); result = resultsItr.next(); rolls = result.getAllRolls(); Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(2), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(2), rollValues.next()); } @Test @@ -141,14 +141,14 @@ public final void testRolls_Subtraction() { Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(1), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(1), rollValues.next()); result = resultsItr.next(); rolls = result.getAllRolls(); Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(-2), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(-2), rollValues.next()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/results/TestDiceRollerConstantRollResult.java b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/results/TestDiceRollerConstantRollResult.java index 7227eaaa..372a0d1b 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/results/TestDiceRollerConstantRollResult.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/results/TestDiceRollerConstantRollResult.java @@ -55,7 +55,7 @@ public final void testRolls_Negative() { Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(-4), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(-4), rollValues.next()); } @Test @@ -73,8 +73,8 @@ public final void testRolls_Negative_Dice() { dice = result.getDice(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(-4), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(-4), dice.getSides()); } @Test @@ -96,7 +96,7 @@ public final void testRolls_Positive() { Assertions.assertEquals(1, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(4), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(4), rollValues.next()); } @Test @@ -114,8 +114,8 @@ public final void testRolls_Positive_Dice() { dice = result.getDice(); - Assertions.assertEquals(new Integer(1), dice.getQuantity()); - Assertions.assertEquals(new Integer(4), dice.getSides()); + Assertions.assertEquals(Integer.valueOf(1), dice.getQuantity()); + Assertions.assertEquals(Integer.valueOf(4), dice.getSides()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/results/TestDiceRollerDiceRollResult.java b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/results/TestDiceRollerDiceRollResult.java index 2f6b22cc..ab96971e 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/results/TestDiceRollerDiceRollResult.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/results/TestDiceRollerDiceRollResult.java @@ -74,8 +74,8 @@ public final void testRoll_generator() { rolls = rolledValues.getAllRolls().iterator(); - Assertions.assertEquals(new Integer(1), rolls.next()); - Assertions.assertEquals(new Integer(2), rolls.next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.next()); + Assertions.assertEquals(Integer.valueOf(2), rolls.next()); } @Test @@ -97,8 +97,8 @@ public final void testRoll_SingleSide_Dice() { .iterator().next(); diceResult = result.getDice(); - Assertions.assertEquals(new Integer(3), diceResult.getQuantity()); - Assertions.assertEquals(new Integer(1), diceResult.getSides()); + Assertions.assertEquals(Integer.valueOf(3), diceResult.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), diceResult.getSides()); } @Test @@ -118,7 +118,7 @@ public final void testRoll_SingleSide_FinalRoll() { result = new DiceRoller().transform(expression).getRollResults() .iterator().next(); - Assertions.assertEquals(new Integer(3), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(3), result.getTotalRoll()); } @Test @@ -165,9 +165,9 @@ public final void testRoll_SingleSide_Rolls() { Assertions.assertEquals(3, Iterables.size(rolls)); rollValues = rolls.iterator(); - Assertions.assertEquals(new Integer(1), rollValues.next()); - Assertions.assertEquals(new Integer(1), rollValues.next()); - Assertions.assertEquals(new Integer(1), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(1), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(1), rollValues.next()); + Assertions.assertEquals(Integer.valueOf(1), rollValues.next()); } @Test @@ -189,8 +189,8 @@ public final void testRoll_SmallestDice_Dice() { .iterator().next(); diceResult = result.getDice(); - Assertions.assertEquals(new Integer(1), diceResult.getQuantity()); - Assertions.assertEquals(new Integer(1), diceResult.getSides()); + Assertions.assertEquals(Integer.valueOf(1), diceResult.getQuantity()); + Assertions.assertEquals(Integer.valueOf(1), diceResult.getSides()); } @Test @@ -210,7 +210,7 @@ public final void testRoll_SmallestDice_FinalRoll() { result = new DiceRoller().transform(expression).getRollResults() .iterator().next(); - Assertions.assertEquals(new Integer(1), result.getTotalRoll()); + Assertions.assertEquals(Integer.valueOf(1), result.getTotalRoll()); } @Test @@ -254,7 +254,7 @@ public final void testRoll_SmallestDice_Rolls() { Assertions.assertEquals(1, Iterables.size(results)); Assertions.assertEquals(1, Iterables.size(rolls)); - Assertions.assertEquals(new Integer(1), rolls.iterator().next()); + Assertions.assertEquals(Integer.valueOf(1), rolls.iterator().next()); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerAdditionOperationValue.java b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerAdditionOperationValue.java index ab387a68..28d063cc 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerAdditionOperationValue.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerAdditionOperationValue.java @@ -53,7 +53,7 @@ public final void testTotalRoll() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(3), rolled); + Assertions.assertEquals(Integer.valueOf(3), rolled); } @Test @@ -72,7 +72,7 @@ public final void testTotalRoll_AddNegative() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(-1), rolled); + Assertions.assertEquals(Integer.valueOf(-1), rolled); } @Test @@ -99,7 +99,7 @@ public final void testTotalRoll_AddNegative_Grouped() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(0), rolled); + Assertions.assertEquals(Integer.valueOf(0), rolled); } @Test @@ -118,7 +118,7 @@ public final void testTotalRoll_AddNegatives() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(-3), rolled); + Assertions.assertEquals(Integer.valueOf(-3), rolled); } @Test @@ -137,7 +137,7 @@ public final void testTotalRoll_AddToNegative() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(1), rolled); + Assertions.assertEquals(Integer.valueOf(1), rolled); } @Test @@ -164,7 +164,7 @@ public final void testTotalRoll_AddToNegative_Grouped() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(2), rolled); + Assertions.assertEquals(Integer.valueOf(2), rolled); } @Test @@ -197,7 +197,7 @@ public final void testTotalRoll_GroupedNegatives() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(-2), rolled); + Assertions.assertEquals(Integer.valueOf(-2), rolled); } @Test @@ -216,7 +216,7 @@ public final void testTotalRoll_Zeroes() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(0), rolled); + Assertions.assertEquals(Integer.valueOf(0), rolled); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerDiceValue.java b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerDiceValue.java index c6cfad46..637f1fe1 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerDiceValue.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerDiceValue.java @@ -62,7 +62,7 @@ public final void testTotalRoll_CustomGenerator_MultipleValues() { rolled = new DiceRoller(generator).transform(expression).getTotalRoll(); - Assertions.assertEquals(new Integer(6), rolled); + Assertions.assertEquals(Integer.valueOf(6), rolled); } @Test @@ -87,7 +87,7 @@ public final void testTotalRoll_Generator() { rolled = new DiceRoller(generator).transform(expression).getTotalRoll(); - Assertions.assertEquals(new Integer(5), rolled); + Assertions.assertEquals(Integer.valueOf(5), rolled); } @Test @@ -106,7 +106,7 @@ public final void testTotalRoll_NegativeQuantity() { rolled = new DiceRoller().transform(expression).getTotalRoll(); - Assertions.assertEquals(new Integer(-1), rolled); + Assertions.assertEquals(Integer.valueOf(-1), rolled); } @Test @@ -125,7 +125,7 @@ public final void testTotalRoll_NegativeSides() { rolled = new DiceRoller().transform(expression).getTotalRoll(); - Assertions.assertEquals(new Integer(0), rolled); + Assertions.assertEquals(Integer.valueOf(0), rolled); } @Test @@ -144,7 +144,7 @@ public final void testTotalRoll_NoQuantity() { rolled = new DiceRoller().transform(expression).getTotalRoll(); - Assertions.assertEquals(new Integer(0), rolled); + Assertions.assertEquals(Integer.valueOf(0), rolled); } @Test @@ -163,7 +163,7 @@ public final void testTotalRoll_NoSides() { rolled = new DiceRoller().transform(expression).getTotalRoll(); - Assertions.assertEquals(new Integer(0), rolled); + Assertions.assertEquals(Integer.valueOf(0), rolled); } @Test @@ -182,7 +182,7 @@ public final void testTotalRoll_Smallest() { rolled = new DiceRoller().transform(expression).getTotalRoll(); - Assertions.assertEquals(new Integer(1), rolled); + Assertions.assertEquals(Integer.valueOf(1), rolled); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerDivisionOperationValue.java b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerDivisionOperationValue.java index 70776643..e9814768 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerDivisionOperationValue.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerDivisionOperationValue.java @@ -54,7 +54,7 @@ public final void testTotalRoll() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(2), rolled); + Assertions.assertEquals(Integer.valueOf(2), rolled); } @Test @@ -73,7 +73,7 @@ public final void testTotalRoll_DivideByNegative() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(-2), rolled); + Assertions.assertEquals(Integer.valueOf(-2), rolled); } @Test @@ -100,7 +100,7 @@ public final void testTotalRoll_DivideByNegative_Grouped() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(-1), rolled); + Assertions.assertEquals(Integer.valueOf(-1), rolled); } /** @@ -122,7 +122,7 @@ public final void testTotalRoll_DivideNegative() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(-2), rolled); + Assertions.assertEquals(Integer.valueOf(-2), rolled); } @Test @@ -149,7 +149,7 @@ public final void testTotalRoll_DivideNegative_Grouped() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(-2), rolled); + Assertions.assertEquals(Integer.valueOf(-2), rolled); } @Test @@ -168,7 +168,7 @@ public final void testTotalRoll_DivideNegatives() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(2), rolled); + Assertions.assertEquals(Integer.valueOf(2), rolled); } @Test @@ -201,7 +201,7 @@ public final void testTotalRoll_GroupedNegatives() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(1), rolled); + Assertions.assertEquals(Integer.valueOf(1), rolled); } @Test diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerMultiplicationOperationValue.java b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerMultiplicationOperationValue.java index 0a2596de..93be7dd4 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerMultiplicationOperationValue.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerMultiplicationOperationValue.java @@ -50,7 +50,7 @@ public final void testTotalRoll() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(2), rolled); + Assertions.assertEquals(Integer.valueOf(2), rolled); } @Test @@ -83,7 +83,7 @@ public final void testTotalRoll_GroupedNegatives() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(1), rolled); + Assertions.assertEquals(Integer.valueOf(1), rolled); } @Test @@ -102,7 +102,7 @@ public final void testTotalRoll_MultiplyNegative() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(-2), rolled); + Assertions.assertEquals(Integer.valueOf(-2), rolled); } @Test @@ -129,7 +129,7 @@ public final void testTotalRoll_MultiplyNegative_Grouped() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(-3), rolled); + Assertions.assertEquals(Integer.valueOf(-3), rolled); } @Test @@ -148,7 +148,7 @@ public final void testTotalRoll_MultiplyNegatives() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(2), rolled); + Assertions.assertEquals(Integer.valueOf(2), rolled); } @Test @@ -167,7 +167,7 @@ public final void testTotalRoll_MultiplyToNegative() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(-2), rolled); + Assertions.assertEquals(Integer.valueOf(-2), rolled); } @Test @@ -194,7 +194,7 @@ public final void testTotalRoll_MultiplyToNegative_Grouped() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(-1), rolled); + Assertions.assertEquals(Integer.valueOf(-1), rolled); } @Test @@ -213,7 +213,7 @@ public final void testTotalRoll_Zeroes() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(0), rolled); + Assertions.assertEquals(Integer.valueOf(0), rolled); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerSubtractionOperationValue.java b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerSubtractionOperationValue.java index c50f23d2..6c47d984 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerSubtractionOperationValue.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/roller/value/TestDiceRollerSubtractionOperationValue.java @@ -50,7 +50,7 @@ public final void testTotalRoll() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(-1), rolled); + Assertions.assertEquals(Integer.valueOf(-1), rolled); } @Test @@ -83,7 +83,7 @@ public final void testTotalRoll_GroupedNegatives() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(0), rolled); + Assertions.assertEquals(Integer.valueOf(0), rolled); } @Test @@ -110,7 +110,7 @@ public final void testTotalRoll_SubtractGrouped() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(-4), rolled); + Assertions.assertEquals(Integer.valueOf(-4), rolled); } @Test @@ -131,7 +131,7 @@ public final void testTotalRoll_SubtractNegative() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(3), rolled); + Assertions.assertEquals(Integer.valueOf(3), rolled); } @Test @@ -159,7 +159,7 @@ public final void testTotalRoll_SubtractNegative_Grouped() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(2), rolled); + Assertions.assertEquals(Integer.valueOf(2), rolled); } @Test @@ -179,7 +179,7 @@ public final void testTotalRoll_SubtractNegatives() { operation = new SubtractionOperation(left, right); rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(1), rolled); + Assertions.assertEquals(Integer.valueOf(1), rolled); } @Test @@ -199,7 +199,7 @@ public final void testTotalRoll_SubtractToNegative() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(-3), rolled); + Assertions.assertEquals(Integer.valueOf(-3), rolled); } @Test @@ -226,7 +226,7 @@ public final void testTotalRoll_SubtractToNegative_Grouped() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(-4), rolled); + Assertions.assertEquals(Integer.valueOf(-4), rolled); } @Test @@ -245,7 +245,7 @@ public final void testTotalRoll_Zeroes() { rolled = new DiceRoller().transform(operation).getTotalRoll(); - Assertions.assertEquals(new Integer(0), rolled); + Assertions.assertEquals(Integer.valueOf(0), rolled); } } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/traverser/TestInorderTraverser.java b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/traverser/TestInorderTraverser.java index 6e879af8..075f7fec 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/traverser/TestInorderTraverser.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/traverser/TestInorderTraverser.java @@ -71,7 +71,7 @@ public final void testList() { exp = exps.next(); Assertions.assertTrue(exp instanceof IntegerOperand); - Assertions.assertEquals(new Integer(1), + Assertions.assertEquals(Integer.valueOf(1), ((IntegerOperand) exp).getValue()); exp = exps.next(); @@ -79,7 +79,7 @@ public final void testList() { exp = exps.next(); Assertions.assertTrue(exp instanceof IntegerOperand); - Assertions.assertEquals(new Integer(2), + Assertions.assertEquals(Integer.valueOf(2), ((IntegerOperand) exp).getValue()); exp = exps.next(); @@ -87,7 +87,7 @@ public final void testList() { exp = exps.next(); Assertions.assertTrue(exp instanceof IntegerOperand); - Assertions.assertEquals(new Integer(3), + Assertions.assertEquals(Integer.valueOf(3), ((IntegerOperand) exp).getValue()); } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/traverser/TestPostorderTraverser.java b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/traverser/TestPostorderTraverser.java index ade05ec8..3c459723 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/traverser/TestPostorderTraverser.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/traverser/TestPostorderTraverser.java @@ -69,12 +69,12 @@ public final void testList() { exp = exps.next(); Assertions.assertTrue(exp instanceof IntegerOperand); - Assertions.assertEquals(new Integer(1), + Assertions.assertEquals(Integer.valueOf(1), ((IntegerOperand) exp).getValue()); exp = exps.next(); Assertions.assertTrue(exp instanceof IntegerOperand); - Assertions.assertEquals(new Integer(2), + Assertions.assertEquals(Integer.valueOf(2), ((IntegerOperand) exp).getValue()); exp = exps.next(); @@ -82,7 +82,7 @@ public final void testList() { exp = exps.next(); Assertions.assertTrue(exp instanceof IntegerOperand); - Assertions.assertEquals(new Integer(3), + Assertions.assertEquals(Integer.valueOf(3), ((IntegerOperand) exp).getValue()); exp = exps.next(); diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/traverser/TestPreorderTraverser.java b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/traverser/TestPreorderTraverser.java index 43f94f23..99becde0 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/traverser/TestPreorderTraverser.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/unit/interpreter/traverser/TestPreorderTraverser.java @@ -74,17 +74,17 @@ public final void testList() { exp = exps.next(); Assertions.assertTrue(exp instanceof IntegerOperand); - Assertions.assertEquals(new Integer(1), + Assertions.assertEquals(Integer.valueOf(1), ((IntegerOperand) exp).getValue()); exp = exps.next(); Assertions.assertTrue(exp instanceof IntegerOperand); - Assertions.assertEquals(new Integer(2), + Assertions.assertEquals(Integer.valueOf(2), ((IntegerOperand) exp).getValue()); exp = exps.next(); Assertions.assertTrue(exp instanceof IntegerOperand); - Assertions.assertEquals(new Integer(3), + Assertions.assertEquals(Integer.valueOf(3), ((IntegerOperand) exp).getValue()); } diff --git a/src/test/java/com/bernardomg/tabletop/dice/test/unit/roll/TestDiceToRollResult.java b/src/test/java/com/bernardomg/tabletop/dice/test/unit/roll/TestDiceToRollResult.java index 3e4ee866..dde8581d 100644 --- a/src/test/java/com/bernardomg/tabletop/dice/test/unit/roll/TestDiceToRollResult.java +++ b/src/test/java/com/bernardomg/tabletop/dice/test/unit/roll/TestDiceToRollResult.java @@ -55,7 +55,7 @@ public final void testApply_AddSingleValue() { rolled = new DiceToRollResult(generator).apply(dice).getTotalRoll(); - Assertions.assertEquals(new Integer(5), rolled); + Assertions.assertEquals(Integer.valueOf(5), rolled); } @Test @@ -77,7 +77,7 @@ public final void testApply_AddsTotalRoll() { rolled = new DiceToRollResult(generator).apply(dice).getTotalRoll(); - Assertions.assertEquals(new Integer(6), rolled); + Assertions.assertEquals(Integer.valueOf(6), rolled); } @Test @@ -100,8 +100,8 @@ public final void testApply_ReturnsAllRolls() { rolled = new DiceToRollResult(generator).apply(dice).getAllRolls() .iterator(); - Assertions.assertEquals(new Integer(1), rolled.next()); - Assertions.assertEquals(new Integer(2), rolled.next()); + Assertions.assertEquals(Integer.valueOf(1), rolled.next()); + Assertions.assertEquals(Integer.valueOf(2), rolled.next()); } @Test @@ -123,8 +123,8 @@ public final void testApply_ReturnsDice() { returned = new DiceToRollResult(generator).apply(dice).getDice(); - Assertions.assertEquals(new Integer(1), returned.getQuantity()); - Assertions.assertEquals(new Integer(2), returned.getSides()); + Assertions.assertEquals(Integer.valueOf(1), returned.getQuantity()); + Assertions.assertEquals(Integer.valueOf(2), returned.getSides()); } } From 1ab668ee819156c1f732cf350958d27671f02650 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sat, 20 Feb 2021 12:19:29 +0100 Subject: [PATCH 10/17] Updated skin --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 37dac558..9cace469 100644 --- a/pom.xml +++ b/pom.xml @@ -228,7 +228,7 @@ - 2.0.10 + 2.0.11 https://bintray.com/bernardo-mg/tabletop-toolkits/dice/view http://mvnrepository.com/artifact/com.bernardomg.tabletop/dice From dd284ff011151685573b81334e912863f941595b Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sat, 20 Feb 2021 14:48:17 +0100 Subject: [PATCH 11/17] Updated dependencies --- pom.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 9cace469..9852209b 100644 --- a/pom.xml +++ b/pom.xml @@ -214,11 +214,11 @@ 4.7.2 - 29.0-jre - 5.6.2 - 3.4.0 - 2.13.3 - 1.7.28 + 30.1-jre + 5.7.1 + 3.7.7 + 2.14.0 + 1.7.30 From bad72aa22effac018bea173b81e6f03c10987209 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sat, 20 Feb 2021 20:06:30 +0100 Subject: [PATCH 12/17] Updated ANTRL --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 9852209b..1ea9a11e 100644 --- a/pom.xml +++ b/pom.xml @@ -213,7 +213,7 @@ - 4.7.2 + 4.9.1 30.1-jre 5.7.1 3.7.7 @@ -222,8 +222,8 @@ - 4.7.2 - 1.11 + 4.9.1 + 1.17 3.2.0 From a379574b0b5616f5fe89c606a156d8a7262e137d Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sat, 20 Feb 2021 20:11:57 +0100 Subject: [PATCH 13/17] Dropped support for Java 8 --- .github/workflows/deploy.yml | 2 +- .github/workflows/deploy_docs.yml | 2 +- .github/workflows/testing.yml | 2 +- pom.xml | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d29351c7..096780af 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,7 +20,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v1 with: - java-version: 1.8 + java-version: 11 - name: Set up Maven settings uses: bernardo-mg/deployment-maven-settings-action@v1.1.2 with: diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index b5f50844..6ed6f20c 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -26,7 +26,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v1 with: - java-version: 1.8 + java-version: 11 - name: Set up Maven settings uses: bernardo-mg/deployment-maven-settings-action@v1.1.2 with: diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index dc3e1505..8bb389b7 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - jdk: [ 8, 11, 14 ] + jdk: [ 11, 14 ] steps: - name: Check-out diff --git a/pom.xml b/pom.xml index 1ea9a11e..6dee74b9 100644 --- a/pom.xml +++ b/pom.xml @@ -206,6 +206,10 @@ + + + + 11 From 7f7ed1adf75484c5d88254a22454c33f4c4bf67b Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sat, 20 Feb 2021 20:50:08 +0100 Subject: [PATCH 14/17] Updated super POM --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6dee74b9..290ac700 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.bernardomg.maven base-pom - 1.3.5 + 1.3.6 From ec792b10e11852bba71e7ef9b0465da865b6a80c Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sun, 21 Feb 2021 00:06:17 +0100 Subject: [PATCH 15/17] Replaced findbugs with spotbugs --- pom.xml | 20 +++++++++---------- .../spotbugs-exclude.xml} | 0 src/site/markdown/reports.md | 4 ++-- 3 files changed, 11 insertions(+), 13 deletions(-) rename src/config/{findbugs/findbugs-exclude.xml => spotbugs/spotbugs-exclude.xml} (100%) diff --git a/pom.xml b/pom.xml index 290ac700..b932f490 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.bernardomg.maven base-pom - 1.3.6 + 1.4.0 @@ -458,16 +458,6 @@ - - - - org.codehaus.mojo - findbugs-maven-plugin - - - ${project.basedir}/src/config/findbugs/findbugs-exclude.xml - - @@ -510,6 +500,14 @@ + + com.github.spotbugs + spotbugs-maven-plugin + + + ${project.basedir}/src/config/spotbugs/spotbugs-exclude.xml + + diff --git a/src/config/findbugs/findbugs-exclude.xml b/src/config/spotbugs/spotbugs-exclude.xml similarity index 100% rename from src/config/findbugs/findbugs-exclude.xml rename to src/config/spotbugs/spotbugs-exclude.xml diff --git a/src/site/markdown/reports.md b/src/site/markdown/reports.md index ed12c1db..c2e5f9b5 100644 --- a/src/site/markdown/reports.md +++ b/src/site/markdown/reports.md @@ -13,7 +13,7 @@ |Report|Description| |---|---| |[Checkstyle][checkstyle]|Report on coding style conventions.| -|[FindBugs][findbugs]|Generates a source code report with the FindBugs Library.| +|[SpotBugs][spotbugs]|Generates a source code report with the SpotBugs Library.| |[PMD][pmd]|Verification of coding rules.| |[CPD][cpd]|Duplicate code detection.| |[JDepend][jdepend]|Quality metrics for the project.| @@ -40,11 +40,11 @@ [dependencies]: ./dependencies.html [dependency-analysis]: ./dependency-analysis.html [failsafe]: ./failsafe-report.html -[findbugs]: ./findbugs.html [jacoco]: ./jacoco/index.html [jdepend]: ./jdepend-report.html [pmd]: ./pmd.html [plugins]: ./plugins.html [plugins-manage]: ./plugin-management.html +[spotbugs]: ./spotbugs.html [surefire]: ./surefire-report.html [taglist]: ./taglist.html From 52d0f332e3516f7e237b2f76cf71ca511b80bb4b Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sun, 21 Feb 2021 00:33:09 +0100 Subject: [PATCH 16/17] Release --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b932f490..cdc3c0ec 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ com.bernardomg.tabletop dice - 2.1.0-SNAPSHOT + 2.1.0 jar Dice Notation Tools for Java From 82659f6670242ec0ff5c00d4620b105f2a4a973b Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sun, 21 Feb 2021 00:35:40 +0100 Subject: [PATCH 17/17] Updated changes log --- src/changes/changes.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index b36c44c5..155cb654 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -132,7 +132,10 @@ The parser's error listener is configurable. - + + + Removed support for JDK 8. +