Skip to content

Commit

Permalink
[JAVA-8268] Rename test files to match naming pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
hkhan committed Jan 3, 2022
1 parent a8d4b21 commit da8cc31
Show file tree
Hide file tree
Showing 59 changed files with 56 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.baeldung.getterssetters
import org.junit.jupiter.api.Assertions.*
import org.junit.jupiter.api.Test

class BookTest {
class BookUnitTest {

@Test
fun `Given a Book instance, When author is modified, Then author property is updated`() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
import java.math.RoundingMode

class RoundingWithBigDecimalTest {
class RoundingWithBigDecimalUnitTest {
private val rawPositive = 0.34444
private val rawNegative = -0.3444

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import java.text.DecimalFormat
import java.text.DecimalFormatSymbols
import java.util.*

class RoundingWithDecimalFormatTest {
class RoundingWithDecimalFormatUnitTest {
private val df = DecimalFormat("#.#", DecimalFormatSymbols(Locale.ENGLISH))
private val raw1 = 0.34.toBigDecimal()
private val raw2 = 0.35.toBigDecimal()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
import java.util.*

class RoundingWithStringFormatTest {
class RoundingWithStringFormatUnitTest {
private val raw1 = 0.34.toBigDecimal()
private val raw2 = 0.35.toBigDecimal()
private val raw3 = 0.36.toBigDecimal()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test

class ArrayTraversal {
class ArrayTraversalUnitTest {
lateinit var dice: Array<Int>

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.baeldung.maps
import org.junit.jupiter.api.Assertions.*
import org.junit.jupiter.api.Test

class MapOperationsTest {
class MapOperationsUnitTest {

private val defaultIceCreamInventory = mapOf(
"Vanilla" to 24,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Assertions.assertNull
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test

class NodeTest {
class NodeUnitTest {

@BeforeEach
fun setUp() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.baeldung.files
import org.junit.Test
import java.io.File

class ListingFilesRecursivelyTest {
class ListingFilesRecursivelyUnitTest {

@Test
fun `Walk - Top Down as default`() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class InputStreamToFileUnitTest {
}

assertThat(File("./copied")).hasContent(content)
Files.deleteIfExists(Paths.get("./copied"))
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.baeldung.kotlin
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test

class ExtensionMethods {
class ExtensionMethodsUnitTest {
@Test
fun simpleExtensionMethod() {
assertEquals("Nothing", "Nothing".escapeForXml())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertThrows
import kotlin.test.assertFailsWith

class AssertFailsWithFunctionTest {
class AssertFailsWithFunctionUnitTest {
private val classUnderTest: AssertFailsWithFunction = AssertFailsWithFunction()

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.baeldung.interoperability
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals

class ArrayTest {
class ArrayUnitTest {

@Test
fun givenArray_whenValidateArrayType_thenComplete () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.baeldung.interoperability
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals

class CustomerTest {
class CustomerUnitTest {

@Test
fun givenCustomer_whenNameAndLastNameAreAssigned_thenComplete() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.baeldung.introduction
import org.junit.jupiter.api.Test
import kotlin.test.assertNotNull

class ItemServiceTest {
class ItemServiceUnitTest {

@Test
fun givenItemId_whenGetForOptionalItem_shouldMakeActionOnNonNullValue() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.junit.jupiter.api.Test
import kotlin.test.assertEquals


class KotlinJavaInteroperabilityTest {
class KotlinJavaInteroperabilityUnitTest {

@Test
fun givenLowercaseString_whenExecuteMethodFromJavaStringUtils_shouldReturnStringUppercase() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.junit.jupiter.api.Test
import kotlin.test.assertEquals


class LambdaTest {
class LambdaUnitTest {

@Test
fun givenListOfNumber_whenDoingOperationsUsingLambda_shouldReturnProperResult() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.baeldung.introduction
import org.junit.jupiter.api.Test
import kotlin.test.assertTrue

class ListExtensionTest {
class ListExtensionUnitTest {

@Test
fun givenList_whenExecuteExtensionFunctionOnList_shouldReturnRandomElementOfList() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.junit.jupiter.api.Test
import java.util.concurrent.ThreadLocalRandom
import kotlin.test.assertTrue

class RandomNumberTest {
class RandomNumberUnitTest {

@Test
fun whenRandomNumberWithJavaUtilMath_thenResultIsBetween0And1() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.junit.jupiter.api.Test
import kotlin.test.assertEquals
import java.time.Instant

class SequencesTest {
class SequencesUnitTest {

@Test
fun shouldBuildSequenceWhenUsingFromElements() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.baeldung.ternary
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals

class TernaryOperatorTest {
class TernaryOperatorUnitTest {

@Test
fun `using If`() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import uy.klutter.core.collections.asReadOnly
import uy.klutter.core.collections.toImmutable
import java.util.*

class KotlinBuiltInTest {
class KotlinBuiltInUnitTest {

@Test
fun `Kotlin built-in immutable collections`() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse

class RxKotlinTest {
class RxKotlinUnitTest {

@Test
fun whenBooleanArrayToObserver_thenBooleanObserver() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import org.junit.Test

@Ignore
// Note that this can not run in the same test run if KovenantTest has already been executed
class KovenantTimeoutTest {
class KovenantTimeoutUnitTest {
@Test
fun testTimeout() {
val promise = timedTask(1000) { "Hello" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import java.io.IOException
import java.util.*
import java.util.concurrent.TimeUnit

class KovenantTest {
class KovenantUnitTest {

@Before
fun setupTestMode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import arrow.core.*
import org.junit.Assert
import org.junit.Test

class FunctionalDataTypes {
class FunctionalDataTypesUnitTest {

@Test
fun whenIdCreated_thanValueIsPresent(){
Expand Down Expand Up @@ -104,7 +104,7 @@ class FunctionalDataTypes {
var counter : Int = 0
val map = now.map { x -> counter++; x+1 }
Assert.assertEquals(0, counter)

val value = map.value()
Assert.assertEquals(2, value)
Assert.assertEquals(1, counter)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.baeldung.kotlin.arrow.FunctionalErrorHandlingWithEither.ComputeProble
import org.junit.Assert
import org.junit.Test

class FunctionalErrorHandlingWithEitherTest {
class FunctionalErrorHandlingWithEitherUnitTest {

val operator = FunctionalErrorHandlingWithEither()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.baeldung.kotlin.arrow
import org.junit.Assert
import org.junit.Test

class FunctionalErrorHandlingWithOptionTest {
class FunctionalErrorHandlingWithOptionUnitTest {

val operator = FunctionalErrorHandlingWithOption()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import org.junit.Test
import kotlin.test.assertEquals
import kotlin.test.assertFalse

class RxKotlinTest {
class RxKotlinUnitTest {

@Test
fun whenBooleanArrayToObserver_thenBooleanObserver() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.baeldung.kotlin.multiplatform.subtract
import kotlin.test.Test
import kotlin.test.assertEquals

class CalculatorTest {
class CalculatorUnitTest {

@Test
fun testAdd() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.baeldung.kotlin.multiplatform
import kotlin.test.Test
import kotlin.test.assertEquals

class ExtendedCalculatorTest {
class ExtendedCalculatorUnitTest {

@Test
fun testSquare() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import org.junit.Test
import org.slf4j.LoggerFactory
import java.lang.Exception

class ActorsBehaviorTest {
class ActorsBehaviorUnitTest {
companion object {
private val LOG = LoggerFactory.getLogger(ActorsBehaviorTest::class.java)
private val LOG = LoggerFactory.getLogger(ActorsBehaviorUnitTest::class.java)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import org.junit.Test
import org.slf4j.LoggerFactory
import java.util.concurrent.TimeUnit

class ActorsTest {
class ActorsUnitTest {
companion object {
private val LOG = LoggerFactory.getLogger(ActorsTest::class.java)
private val LOG = LoggerFactory.getLogger(ActorsUnitTest::class.java)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import co.paralleluniverse.strands.channels.Selector
import com.google.common.base.Function
import org.junit.Test

class ChannelsTest {
class ChannelsUnitTest {
@Test
fun createChannel() {
Channels.newChannel<String>(0, // The size of the channel buffer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.junit.Assert
import org.junit.Test
import java.util.concurrent.TimeUnit

class DataflowTest {
class DataflowUnitTest {
@Test
fun testValVar() {
val a = Var<Int>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import org.reactivestreams.Subscription
import org.slf4j.LoggerFactory
import java.util.concurrent.TimeUnit

class ReactiveStreamsTest {
class ReactiveStreamsUnitTest {
companion object {
private val LOG = LoggerFactory.getLogger(ReactiveStreamsTest::class.java)
private val LOG = LoggerFactory.getLogger(ReactiveStreamsUnitTest::class.java)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import org.junit.Test
import java.util.concurrent.TimeUnit


class SuspendableCallableTest {
class SuspendableCallableUnitTest {
@Test
fun createFiber() {
class Callable : SuspendableCallable<String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import java.util.concurrent.TimeUnit
import java.util.concurrent.TimeoutException


class SuspensableRunnableTest {
class SuspensableRunnableUnitTest {
@Test
fun createFiber() {
class Runnable : SuspendableRunnable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import kotlin.test.assertEquals
import kotlin.test.assertNotNull
import kotlin.test.assertTrue

class ApplicationTest {
class ApplicationLiveTest {

@Test
fun when_queried_on_root_then_joke_works() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import org.springframework.test.web.reactive.server.WebTestClient

@WebFluxTest
@ContextConfiguration(classes = [RouterConfiguration::class])
class KotlinSpringExecutableApplicationTests {
class KotlinSpringExecutableApplicationIntegrationTest {
@Autowired
lateinit var context: ApplicationContext
lateinit var webTestClient: WebTestClient
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.baeldung.kotlin.spek
package com.baeldung.spek

import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.describe
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.baeldung.kotlin.spek
package com.baeldung.spek

import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.describe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import org.springframework.test.context.ContextConfiguration
)
@RunWith(SpringRunner::class)
@ContextConfiguration(classes = [ProductsHandler::class, RouterConfiguration::class])
class ProductHandlerTest {
class ProductHandlerUnitTest {

@Autowired
private lateinit var client: WebTestClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManager
import org.springframework.data.repository.findByIdOrNull

@DataJpaTest
class BankAccountRepositoryTest {
class BankAccountRepositoryUnitTest {

@Autowired
lateinit var entityManager: TestEntityManager
Expand Down
Loading

0 comments on commit da8cc31

Please sign in to comment.