Commit 0b2c2e29 authored by Aneta Steimarova's avatar Aneta Steimarova

#941 Created i-tests for game Pursuit bonus difficulty

parent dc291600
TestGameShootingRangeEasyNoneStar
TestGameShootingRangeEasyOneStar
TestGameShootingRangeEasyTwoStar
TestGameShootingRangeEasyThreeStar
TestGameShootingRangeMediumNoneStar
TestGameShootingRangeMediumOneStar
TestGameShootingRangeMediumTwoStar
TestGameShootingRangeMediumThreeStar
TestGameShootingRangeHardNoneStar
TestGameShootingRangeHardOneStar
TestGameShootingRangeHardTwoStar
TestGameShootingRangeHardThreeStar
TestGameShootingRangeBonusNoneStar
TestGameShootingRangeBonusOneStar
TestGameShootingRangeBonusTwoStar
TestGameShootingRangeBonusThreeStar
TestGameSafeEasyNoneStars
TestGameSafeEasyOneStars
TestGameSafeEasyTwoStars
TestGameSafeEasyThreeStars
TestGameSafeMediumNoneStars
TestGameSafeMediumOneStar
TestGameSafeMediumTwoStars
TestGameSafeMediumThreeStars
TestGameSafeHardNoneStars
TestGameSafeHardOneStar
TestGameSafeHardTwoStars
TestGameSafeHardThreeStars
TestGameSafeBonusNoneStars
TestGameSafeBonusOneStars
TestGameSafeBonusTwoStars
TestGameSafeBonusThreeStars
TestGameCrimeSceneEasyNoneStar
TestGameCrimeSceneEasyOneStar
TestGameCrimeSceneEasyTwoStar
TestGameCrimeSceneEasyThreeStar
TestGameCrimeSceneMediumNoneStar
TestGameCrimeSceneMediumOneStar
TestGameCrimeSceneMediumTwoStar
TestGameCrimeSceneMediumThreeStar
TestGameCrimeSceneHardNoneStar
TestGameCrimeSceneHardOneStar
TestGameCrimeSceneHardTwoStar
TestGameCrimeSceneHardThreeStar
TestGameCrimeSceneBonusNoneStar
TestGameCrimeSceneBonusOneStar
TestGameCrimeSceneBonusTwoStar
TestGameCrimeSceneBonusThreeStar
TestGameRunesEasyNoneStar
TestGameRunesEasyOneStar
TestGameRunesEasyTwoStar
TestGameRunesEasyThreeStar
TestGameRunesMediumNoneStar
TestGameRunesMediumOneStar
TestGameRunesMediumTwoStar
TestGameRunesMediumThreeStar
TestGameRunesHardNoneStar
TestGameRunesHardOneStar
TestGameRunesHardTwoStar
TestGameRunesHardThreeStar
TestGameRunesBonusNoneStar
TestGameRunesBonusOneStar
TestGameRunesBonusTwoStars
TestGameRunesBonusThreeStars
TestGameRobberyEasyNoneStar
TestGameRobberyEasyOneStar
TestGameRobberyEasyTwoStar
TestGameRobberyEasyThreeStar
TestGameRobberyMediumNoneStar
TestGameRobberyMediumOneStar
TestGameRobberyMediumTwoStar
TestGameRobberyMediumThreeStar
TestGameRobberyHardNoneStar
TestGameRobberyHardOneStar
TestGameRobberyHardTwoStar
TestGameRobberyHardThreeStar
TestGameRobberyBonusNoneStar
TestGameRobberyBonusOneStar
TestGameRobberyBonusTwoStars
TestGameRobberyBonusThreeStars
\ No newline at end of file
TestGamePursuitEasyNoneStar
TestGamePursuitEasyOneStar
TestGamePursuitEasyTwoStar
TestGamePursuitEasyThreeStar
TestGamePursuitMediumNoneStar
TestGamePursuitMediumOneStar
TestGamePursuitMediumTwoStar
TestGamePursuitMediumThreeStar
TestGamePursuitHardNoneStar
TestGamePursuitHardOneStar
TestGamePursuitHardTwoStar
TestGamePursuitHardThreeStar
TestGamePursuitBonusNoneStar
TestGamePursuitBonusOneStar
TestGamePursuitBonusTwoStars
TestGamePursuitBonusThreeStars
\ No newline at end of file
......@@ -85,6 +85,8 @@ import cz.nic.tablexia.testing.games.protocol.TestGameProtocolMediumNoneStar;
import cz.nic.tablexia.testing.games.protocol.TestGameProtocolMediumOneStar;
import cz.nic.tablexia.testing.games.protocol.TestGameProtocolMediumThreeStar;
import cz.nic.tablexia.testing.games.protocol.TestGameProtocolMediumTwoStar;
import cz.nic.tablexia.testing.games.pursiut.TestGamePursuitBonusNoneStar;
import cz.nic.tablexia.testing.games.pursiut.TestGamePursuitBonusOneStar;
import cz.nic.tablexia.testing.games.pursiut.TestGamePursuitEasyNoneStar;
import cz.nic.tablexia.testing.games.pursiut.TestGamePursuitEasyOneStar;
import cz.nic.tablexia.testing.games.pursiut.TestGamePursuitEasyThreeStar;
......@@ -97,6 +99,8 @@ import cz.nic.tablexia.testing.games.pursiut.TestGamePursuitMediumNoneStar;
import cz.nic.tablexia.testing.games.pursiut.TestGamePursuitMediumOneStar;
import cz.nic.tablexia.testing.games.pursiut.TestGamePursuitMediumThreeStar;
import cz.nic.tablexia.testing.games.pursiut.TestGamePursuitMediumTwoStar;
import cz.nic.tablexia.testing.games.pursiut.TestGamePursuitBonusThreeStars;
import cz.nic.tablexia.testing.games.pursiut.TestGamePursuitBonusTwoStars;
import cz.nic.tablexia.testing.games.robbery.TestGameRobberyBonusNoneStar;
import cz.nic.tablexia.testing.games.robbery.TestGameRobberyBonusOneStar;
import cz.nic.tablexia.testing.games.robbery.TestGameRobberyBonusThreeStars;
......@@ -253,6 +257,10 @@ public class TestRunner {
listOfTests.add(TestGamePursuitHardOneStar.class);
listOfTests.add(TestGamePursuitHardTwoStar.class);
listOfTests.add(TestGamePursuitHardThreeStar.class);
listOfTests.add(TestGamePursuitBonusNoneStar.class);
listOfTests.add(TestGamePursuitBonusOneStar.class);
listOfTests.add(TestGamePursuitBonusTwoStars.class);
listOfTests.add(TestGamePursuitBonusThreeStars.class);
listOfTests.add(TestGameCrimeSceneEasyNoneStar.class);
listOfTests.add(TestGameCrimeSceneEasyOneStar.class);
listOfTests.add(TestGameCrimeSceneEasyTwoStar.class);
......
......@@ -81,6 +81,7 @@ public class TestGamePursuit extends AbstractTestGame {
clickAt(incGetSteps() + ". Click at medium difficulty button", GamePageGroup.DIFFICULTY_BUTTON_MEDIUM);
clickAt(incGetSteps() + ". Click at hard difficulty button", GamePageGroup.DIFFICULTY_BUTTON_HARD);
clickAt(incGetSteps() + ". Click at easy difficulty button", GamePageGroup.DIFFICULTY_BUTTON_EASY);
clickAt(incGetSteps() + ". Click at bonus difficulty button", GamePageGroup.DIFFICULTY_BUTTON_BONUS);
//setDifficulty
setGameDificulty();
......@@ -253,6 +254,10 @@ public class TestGamePursuit extends AbstractTestGame {
if(expectedResult == AbstractTablexiaGame.GameResult.NO_STAR) return PursuitScoreResolver.HARD_ONE_STAR_DURATION;
else if(expectedResult == AbstractTablexiaGame.GameResult.ONE_STAR) return PursuitScoreResolver.HARD_TWO_STARS_DURATION;
else if(expectedResult == AbstractTablexiaGame.GameResult.TWO_STAR) return PursuitScoreResolver.HARD_THREE_STARS_DURATION;
case BONUS:
if(expectedResult == AbstractTablexiaGame.GameResult.NO_STAR) return PursuitScoreResolver.HARD_ONE_STAR_DURATION;
else if(expectedResult == AbstractTablexiaGame.GameResult.ONE_STAR) return PursuitScoreResolver.HARD_TWO_STARS_DURATION;
else if(expectedResult == AbstractTablexiaGame.GameResult.TWO_STAR) return PursuitScoreResolver.HARD_THREE_STARS_DURATION;
}
return 0;
......@@ -338,6 +343,12 @@ public class TestGamePursuit extends AbstractTestGame {
else if(testTime > PursuitScoreResolver.HARD_THREE_STARS_DURATION) return 2;
else return 3;
case BONUS:
if(testTime > PursuitScoreResolver.HARD_ONE_STAR_DURATION) return 0;
else if(testTime > PursuitScoreResolver.HARD_TWO_STARS_DURATION) return 1;
else if(testTime > PursuitScoreResolver.HARD_THREE_STARS_DURATION) return 2;
else return 3;
}
return 0;
}
......
/*
* Copyright (C) 2017 CZ.NIC, z.s.p.o. (http://www.nic.cz/)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package cz.nic.tablexia.testing.games.pursiut;
import cz.nic.tablexia.Tablexia;
import cz.nic.tablexia.game.AbstractTablexiaGame;
import cz.nic.tablexia.game.difficulty.GameDifficulty;
public class TestGamePursuitBonusNoneStar extends TestGamePursuit {
public TestGamePursuitBonusNoneStar(Tablexia tablexia) {
super(tablexia);
difficulty = GameDifficulty.BONUS;
expectedResult = AbstractTablexiaGame.GameResult.NO_STAR;
}
}
/*
* Copyright (C) 2017 CZ.NIC, z.s.p.o. (http://www.nic.cz/)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package cz.nic.tablexia.testing.games.pursiut;
import cz.nic.tablexia.Tablexia;
import cz.nic.tablexia.game.AbstractTablexiaGame;
import cz.nic.tablexia.game.difficulty.GameDifficulty;
public class TestGamePursuitBonusOneStar extends TestGamePursuit {
public TestGamePursuitBonusOneStar(Tablexia tablexia) {
super(tablexia);
difficulty = GameDifficulty.BONUS;
expectedResult = AbstractTablexiaGame.GameResult.ONE_STAR;
}
}
/*
* Copyright (C) 2017 CZ.NIC, z.s.p.o. (http://www.nic.cz/)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package cz.nic.tablexia.testing.games.pursiut;
import cz.nic.tablexia.Tablexia;
import cz.nic.tablexia.game.AbstractTablexiaGame;
import cz.nic.tablexia.game.difficulty.GameDifficulty;
public class TestGamePursuitBonusThreeStars extends TestGamePursuit {
public TestGamePursuitBonusThreeStars(Tablexia tablexia) {
super(tablexia);
difficulty = GameDifficulty.BONUS;
expectedResult = AbstractTablexiaGame.GameResult.THREE_STAR;
}
}
/*
* Copyright (C) 2017 CZ.NIC, z.s.p.o. (http://www.nic.cz/)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package cz.nic.tablexia.testing.games.pursiut;
import cz.nic.tablexia.Tablexia;
import cz.nic.tablexia.game.AbstractTablexiaGame;
import cz.nic.tablexia.game.difficulty.GameDifficulty;
public class TestGamePursuitBonusTwoStars extends TestGamePursuit {
public TestGamePursuitBonusTwoStars(Tablexia tablexia) {
super(tablexia);
difficulty = GameDifficulty.BONUS;
expectedResult = AbstractTablexiaGame.GameResult.TWO_STAR;
}
}
......@@ -10,3 +10,7 @@ TestGamePursuitHardNoneStar
TestGamePursuitHardOneStar
TestGamePursuitHardTwoStar
TestGamePursuitHardThreeStar
TestGamePursuitBonusNoneStar
TestGamePursuitBonusOneStar
TestGamePursuitBonusTwoStars
TestGamePursuitBonusThreeStars
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment