Merge pull request #1463 from madsboddum/chore/testing/acceptance-test

Renamed IntegrationTest to AcceptanceTest
This commit is contained in:
Josh
2023-12-07 18:52:10 -06:00
committed by GitHub
11 changed files with 26 additions and 23 deletions
@@ -3,13 +3,13 @@ package com.projectswg.holocore.resources.support.global.zone.creation
import com.projectswg.holocore.headless.HeadlessSWGClient
import com.projectswg.holocore.resources.support.objects.swg.SWGObject
import com.projectswg.holocore.resources.support.objects.swg.creature.CreatureObject
import com.projectswg.holocore.test.runners.IntegrationTest
import com.projectswg.holocore.test.runners.AcceptanceTest
import org.junit.jupiter.api.Assertions.assertAll
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
class CharacterCreationTest : IntegrationTest() {
class CharacterCreationTest : AcceptanceTest() {
@BeforeEach
fun setUpUser() {
@@ -29,11 +29,11 @@ package com.projectswg.holocore.services.gameplay.combat.loot
import com.projectswg.holocore.headless.HeadlessSWGClient.Companion.createZonedInCharacter
import com.projectswg.holocore.headless.attack
import com.projectswg.holocore.headless.loot
import com.projectswg.holocore.test.runners.IntegrationTest
import com.projectswg.holocore.test.runners.AcceptanceTest
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
class LootTest : IntegrationTest() {
class LootTest : AcceptanceTest() {
@Test
fun itemsAreGenerated() {
@@ -29,11 +29,11 @@ package com.projectswg.holocore.services.gameplay.player
import com.projectswg.common.data.location.Terrain
import com.projectswg.holocore.headless.*
import com.projectswg.holocore.resources.support.global.player.AccessLevel
import com.projectswg.holocore.test.runners.IntegrationTest
import com.projectswg.holocore.test.runners.AcceptanceTest
import org.junit.jupiter.api.Assertions.*
import org.junit.jupiter.api.Test
class TipCreditsTest : IntegrationTest() {
class TipCreditsTest : AcceptanceTest() {
@Test
fun negativeAmount() {
@@ -30,12 +30,12 @@ import com.projectswg.holocore.headless.CommandFailedException
import com.projectswg.holocore.headless.HeadlessSWGClient
import com.projectswg.holocore.headless.adminGrantSkill
import com.projectswg.holocore.resources.support.global.player.AccessLevel
import com.projectswg.holocore.test.runners.IntegrationTest
import com.projectswg.holocore.test.runners.AcceptanceTest
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertDoesNotThrow
import org.junit.jupiter.api.assertThrows
class AdminCommandAccessTest : IntegrationTest() {
class AdminCommandAccessTest : AcceptanceTest() {
@Test
fun adminsCanUseAdminCommands() {
@@ -30,12 +30,12 @@ import com.projectswg.holocore.headless.HeadlessSWGClient
import com.projectswg.holocore.headless.adminGrantSkill
import com.projectswg.holocore.headless.surrenderSkill
import com.projectswg.holocore.resources.support.global.player.AccessLevel
import com.projectswg.holocore.test.runners.IntegrationTest
import com.projectswg.holocore.test.runners.AcceptanceTest
import org.junit.jupiter.api.Assertions.*
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
class SkillTreeTest : IntegrationTest() {
class SkillTreeTest : AcceptanceTest() {
@BeforeEach
fun setUp() {
@@ -28,13 +28,13 @@ package com.projectswg.holocore.services.gameplay.player.experience
import com.projectswg.holocore.headless.*
import com.projectswg.holocore.resources.support.objects.swg.creature.CreatureObject
import com.projectswg.holocore.test.runners.IntegrationTest
import com.projectswg.holocore.test.runners.AcceptanceTest
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
class TrappingXPTest : IntegrationTest() {
class TrappingXPTest : AcceptanceTest() {
@BeforeEach
fun setUpUser() {
@@ -27,11 +27,11 @@
package com.projectswg.holocore.services.gameplay.player.group
import com.projectswg.holocore.headless.*
import com.projectswg.holocore.test.runners.IntegrationTest
import com.projectswg.holocore.test.runners.AcceptanceTest
import org.junit.jupiter.api.Assertions.*
import org.junit.jupiter.api.Test
class GroupTest : IntegrationTest() {
class GroupTest : AcceptanceTest() {
@Test
fun formGroup() {
@@ -27,13 +27,13 @@
package com.projectswg.holocore.services.support
import com.projectswg.holocore.headless.HeadlessSWGClient
import com.projectswg.holocore.test.runners.IntegrationTest
import com.projectswg.holocore.test.runners.AcceptanceTest
import org.junit.jupiter.api.Assertions.assertFalse
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertThrows
class CharacterManagementTest : IntegrationTest() {
class CharacterManagementTest : AcceptanceTest() {
@Test
fun deleteCharacter() {
@@ -31,11 +31,11 @@ import com.projectswg.holocore.headless.HeadlessSWGClient
import com.projectswg.holocore.headless.adminKill
import com.projectswg.holocore.resources.support.data.server_info.loader.npc.NpcStaticSpawnLoader
import com.projectswg.holocore.resources.support.global.player.AccessLevel
import com.projectswg.holocore.test.runners.IntegrationTest
import com.projectswg.holocore.test.runners.AcceptanceTest
import org.junit.jupiter.api.Assertions.*
import org.junit.jupiter.api.Test
class KillAdminCommandTest : IntegrationTest() {
class KillAdminCommandTest : AcceptanceTest() {
@Test
fun killNpc() {
@@ -30,12 +30,12 @@ import com.projectswg.holocore.headless.AccountBannedException
import com.projectswg.holocore.headless.HeadlessSWGClient
import com.projectswg.holocore.headless.WrongClientVersionException
import com.projectswg.holocore.headless.WrongCredentialsException
import com.projectswg.holocore.test.runners.IntegrationTest
import com.projectswg.holocore.test.runners.AcceptanceTest
import org.junit.jupiter.api.Assertions.assertNotNull
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertThrows
class LoginTest : IntegrationTest() {
class LoginTest : AcceptanceTest() {
@Test
fun validCredentials() {
@@ -63,12 +63,15 @@ import org.junit.jupiter.api.BeforeAll
import org.junit.jupiter.api.BeforeEach
/**
* Integration test runner that sets up all the services required for a full integration test.
* Acceptance test runner that sets up all the services required for an acceptance test.
* This includes all the services required for a character to be able to log in and perform actions.
*
* Integrations tests should be using [com.projectswg.holocore.headless.HeadlessSWGClient] to perform actions.
* Read more about acceptance test-driven development here:
* https://en.wikipedia.org/wiki/Acceptance_test-driven_development
*
* Acceptance tests should be using [com.projectswg.holocore.headless.HeadlessSWGClient] to perform actions.
*/
abstract class IntegrationTest : TestRunnerSynchronousIntents() {
abstract class AcceptanceTest : TestRunnerSynchronousIntents() {
private val memoryUserDatabase = MemoryUserDatabase()