Skip to content

Commit

Permalink
ETU-51767: Added better data in all test requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Goplen committed Sep 20, 2024
1 parent 2ba9af0 commit 529ed07
Show file tree
Hide file tree
Showing 8 changed files with 164 additions and 161 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ package no.entur.shared.mobility.to.ref.data

import no.entur.shared.mobility.to.ref.dto.Asset
import no.entur.shared.mobility.to.ref.dto.AssetProperties
import java.util.UUID

val asset
get() =
Asset(
id = UUID.randomUUID().toString(),
id = "Asset:549",
stateOfCharge = 100,
maxRange = 100,
licensePlate = "EK1234",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import java.util.UUID
val assetType
get() =
AssetType(
id = UUID.randomUUID().toString(),
id = "AssetType:587",
assets = listOf(asset),
assetClass = AssetClass.MOPED,
conditions = conditions,
Expand All @@ -21,7 +21,7 @@ val conditions
listOf(
ConditionDeposit(
conditionType = "ConditionDeposit",
id = UUID.randomUUID().toString(),
id = "ConditionDeposit:958",
amount = 12.50F,
amountExVat = 10.00F,
currencyCode = "NOK",
Expand All @@ -30,7 +30,7 @@ val conditions
),
ConditionRequireOffboardingSteps(
conditionType = "ConditionRequireOffboardingSteps",
id = "deposit50eu",
id = "ConditionDeposit:386",
steps =
listOf(
OffBoardingStep(
Expand All @@ -49,7 +49,7 @@ val conditionsNoDeposit
listOf(
ConditionRequireOffboardingSteps(
conditionType = "ConditionRequireOffboardingSteps",
id = "deposit50eu",
id = "ConditionDeposit:745",
steps =
listOf(
OffBoardingStep(
Expand All @@ -68,7 +68,7 @@ val conditionsWithHighDepositAmount
listOf(
ConditionDeposit(
conditionType = "ConditionDeposit",
id = "deposit50eu",
id = "ConditionDeposit:183",
amount = 125.00F,
amountExVat = 100.00F,
currencyCode = "NOK",
Expand All @@ -77,7 +77,7 @@ val conditionsWithHighDepositAmount
),
ConditionRequireOffboardingSteps(
conditionType = "ConditionRequireOffboardingSteps",
id = "deposit50eu",
id = "ConditionDeposit:046",
steps =
listOf(
OffBoardingStep(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import org.junit.jupiter.api.assertThrows
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import java.time.OffsetDateTime
import java.util.UUID

@SpringBootTest(classes = [Application::class], webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class BookingsControllerTest {
Expand All @@ -20,28 +21,28 @@ class BookingsControllerTest {
@Test
fun bookingsGet() {
bookingsController.bookingsGet(
acceptLanguage = "",
api = "",
apiVersion = "",
maasId = "",
acceptLanguage = "NOB",
api = "TOMP",
apiVersion = "1.5.0",
maasId = "entur:maas:shared-mobility",
addressedTo = TransportOperator.ALL_IMPLEMENTING_OPERATOR,
state = null,
minTime = OffsetDateTime.now(),
maxTime = OffsetDateTime.now(),
minPrice = null,
maxPrice = null,
containsAssetType = "",
containsAssetType = "AssetType:487",
)
}

@Test
fun bookingsIdEventsPost() {
bookingsController.bookingsIdEventsPost(
acceptLanguage = "",
api = "",
apiVersion = "",
maasId = "",
id = "",
id = UUID.randomUUID().toString(),
acceptLanguage = "NOB",
api = "TOMP",
apiVersion = "1.5.0",
maasId = "entur:maas:shared-mobility",
addressedTo = TransportOperator.ALL_IMPLEMENTING_OPERATOR,
bookingOperation = null,
)
Expand All @@ -50,86 +51,86 @@ class BookingsControllerTest {
@Test
fun bookingsIdGet() {
bookingsController.bookingsIdGet(
acceptLanguage = "",
api = "",
apiVersion = "",
maasId = "",
id = "",
acceptLanguage = "NOB",
api = "TOMP",
apiVersion = "1.5.0",
maasId = "entur:maas:shared-mobility",
addressedTo = TransportOperator.ALL_IMPLEMENTING_OPERATOR,
id = UUID.randomUUID().toString(),
)
}

@Test
fun bookingsIdNotificationsGet() {
assertThrows<NotImplementedError> {
bookingsController.bookingsIdNotificationsGet(
acceptLanguage = "",
api = "",
apiVersion = "",
maasId = "",
id = "",
acceptLanguage = "NOB",
api = "TOMP",
apiVersion = "1.5.0",
maasId = "entur:maas:shared-mobility",
addressedTo = TransportOperator.ALL_IMPLEMENTING_OPERATOR,
id = UUID.randomUUID().toString(),
)
}
}

@Test
fun bookingsIdNotificationsPost() {
bookingsController.bookingsIdNotificationsPost(
acceptLanguage = "",
api = "",
apiVersion = "",
maasId = "",
id = "",
acceptLanguage = "NOB",
api = "TOMP",
apiVersion = "1.5.0",
maasId = "entur:maas:shared-mobility",
addressedTo = TransportOperator.ALL_IMPLEMENTING_OPERATOR,
id = UUID.randomUUID().toString(),
notification = null,
)
}

@Test
fun bookingsIdPut() {
bookingsController.bookingsIdPut(
acceptLanguage = "",
api = "",
apiVersion = "",
maasId = "",
id = "",
booking = Booking(),
acceptLanguage = "NOB",
api = "TOMP",
apiVersion = "1.5.0",
maasId = "entur:maas:shared-mobility",
addressedTo = TransportOperator.ALL_IMPLEMENTING_OPERATOR,
id = UUID.randomUUID().toString(),
booking = Booking(),
)
}

@Test
fun bookingsIdSubscriptionDelete() {
bookingsController.bookingsIdSubscriptionDelete(
acceptLanguage = "",
api = "",
apiVersion = "",
maasId = "",
id = "",
acceptLanguage = "NOB",
api = "TOMP",
apiVersion = "1.5.0",
maasId = "entur:maas:shared-mobility",
addressedTo = TransportOperator.ALL_IMPLEMENTING_OPERATOR,
id = UUID.randomUUID().toString(),
)
}

@Test
fun bookingsIdSubscriptionPost() {
bookingsController.bookingsIdSubscriptionPost(
acceptLanguage = "",
api = "",
apiVersion = "",
maasId = "",
acceptLanguage = "NOB",
api = "TOMP",
apiVersion = "1.5.0",
maasId = "entur:maas:shared-mobility",
addressedTo = TransportOperator.ALL_IMPLEMENTING_OPERATOR,
id = "",
id = UUID.randomUUID().toString(),
)
}

@Test
fun bookingsOneStopPost() {
bookingsController.bookingsOneStopPost(
acceptLanguage = "",
api = "",
apiVersion = "",
maasId = "",
acceptLanguage = "NOB",
api = "TOMP",
apiVersion = "1.5.0",
maasId = "entur:maas:shared-mobility",
addressedTo = TransportOperator.ALL_IMPLEMENTING_OPERATOR,
oneStopBookingRequest = OneStopBookingRequest(from = place),
)
Expand All @@ -138,10 +139,10 @@ class BookingsControllerTest {
@Test
fun bookingsPost() {
bookingsController.bookingsPost(
acceptLanguage = "",
api = "",
apiVersion = "",
maasId = "",
acceptLanguage = "NOB",
api = "TOMP",
apiVersion = "1.5.0",
maasId = "entur:maas:shared-mobility",
addressedTo = TransportOperator.ALL_IMPLEMENTING_OPERATOR,
bookingRequest = BookingRequest(),
)
Expand Down
Loading

0 comments on commit 529ed07

Please sign in to comment.