Skip to content

Commit

Permalink
ETU-51767: Removed unwanted test data (#71)
Browse files Browse the repository at this point in the history
* ETU-51767: Removed unwanted test data

* ETU-51767: Added better data in all test requests

* ETU-51767: Fixed linting error
  • Loading branch information
Goplen authored Sep 20, 2024
1 parent 5cc3680 commit 789d2dc
Show file tree
Hide file tree
Showing 26 changed files with 316 additions and 795 deletions.
15 changes: 1 addition & 14 deletions src/main/kotlin/no/entur/shared/mobility/to/ref/data/Asset.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,19 @@ 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 no.entur.shared.mobility.to.ref.dto.Damage
import java.util.UUID

val asset
get() =
Asset(
id = UUID.randomUUID().toString(),
id = "Asset:549",
stateOfCharge = 100,
maxRange = 100,
licensePlate = "EK1234",
damages = listOf(damage),
overriddenProperties = assetProperties,
)

val assetProperties
get() =
AssetProperties(
name = "string",
location = place,
meta = mapOf("vehicleCode" to "1234ABCD"),
)

val damage
get() =
Damage(
vehicleComponent = Damage.VehicleComponent.FRONT,
description = "string",
pictures = listOf("string"),
)
33 changes: 6 additions & 27 deletions src/main/kotlin/no/entur/shared/mobility/to/ref/data/AssetType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,22 @@ import no.entur.shared.mobility.to.ref.dto.AssetType
import no.entur.shared.mobility.to.ref.dto.ConditionDeposit
import no.entur.shared.mobility.to.ref.dto.ConditionRequireOffboardingSteps
import no.entur.shared.mobility.to.ref.dto.OffBoardingStep
import no.entur.shared.mobility.to.ref.dto.SystemPricingPlan

val assetType
get() =
AssetType(
id = "string",
stationId = "string",
nrAvailable = 0,
id = "AssetType:587",
assets = listOf(asset),
assetClass = AssetClass.MOPED,
assetSubClass = "string",
sharedProperties = assetProperties,
applicablePricings = listOf(systemPricingPlan),
defaultPricingPlan = systemPricingPlan,
conditions = conditions,
)

val systemPricingPlan
get() =
SystemPricingPlan(
planId = "freeplan1",
url = "https://www.rentmyfreebike.com/freeplan",
name = "Free Plan",
stationId = "string",
regionId = "string",
fare = fare,
isTaxable = true,
surgePricing = true,
description = "Unlimited plan for free bikes, as long as you don't break them!",
)

val conditions
get() =
listOf(
ConditionDeposit(
conditionType = "ConditionDeposit",
id = "deposit50eu",
id = "ConditionDeposit:958",
amount = 12.50F,
amountExVat = 10.00F,
currencyCode = "NOK",
Expand All @@ -50,7 +29,7 @@ val conditions
),
ConditionRequireOffboardingSteps(
conditionType = "ConditionRequireOffboardingSteps",
id = "deposit50eu",
id = "ConditionDeposit:386",
steps =
listOf(
OffBoardingStep(
Expand All @@ -69,7 +48,7 @@ val conditionsNoDeposit
listOf(
ConditionRequireOffboardingSteps(
conditionType = "ConditionRequireOffboardingSteps",
id = "deposit50eu",
id = "ConditionDeposit:745",
steps =
listOf(
OffBoardingStep(
Expand All @@ -88,7 +67,7 @@ val conditionsWithHighDepositAmount
listOf(
ConditionDeposit(
conditionType = "ConditionDeposit",
id = "deposit50eu",
id = "ConditionDeposit:183",
amount = 125.00F,
amountExVat = 100.00F,
currencyCode = "NOK",
Expand All @@ -97,7 +76,7 @@ val conditionsWithHighDepositAmount
),
ConditionRequireOffboardingSteps(
conditionType = "ConditionRequireOffboardingSteps",
id = "deposit50eu",
id = "ConditionDeposit:046",
steps =
listOf(
OffBoardingStep(
Expand Down
52 changes: 27 additions & 25 deletions src/main/kotlin/no/entur/shared/mobility/to/ref/data/Booking.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package no.entur.shared.mobility.to.ref.data

import no.entur.shared.mobility.to.ref.dto.Address
import no.entur.shared.mobility.to.ref.dto.Booking
import no.entur.shared.mobility.to.ref.dto.BookingState
import no.entur.shared.mobility.to.ref.dto.Coordinates
import no.entur.shared.mobility.to.ref.dto.Customer
import no.entur.shared.mobility.to.ref.dto.Fare
import no.entur.shared.mobility.to.ref.dto.FarePart
import no.entur.shared.mobility.to.ref.dto.Place
import java.time.OffsetDateTime
import java.util.UUID
Expand Down Expand Up @@ -58,45 +58,47 @@ val bookingHigherDepositAmountThanTotalAmount
val place
get() =
Place(
name = "string",
coordinates =
Coordinates(
lng = 6.169639F,
lat = 52.25327F,
alt = 0F,
),
)

val address
get() =
Address(
streetAddress = "example street 18, 2nd floor, 18-B33",
street = "string",
houseNumber = 0,
houseNumberAddition = "string",
addressAdditionalInfo = "string",
areaReference = "Smallcity, Pinetree county",
city = "string",
province = "string",
state = "string",
postalCode = "string",
country = "NO",
)

val fare
get() =
Fare(
estimated = false,
description = "string",
propertyClass = "string",
parts = listOf(farePartFlex),
parts =
listOf(
FarePart(
amount = 3.125F,
amountExVat = 2.5F,
currencyCode = "NOK",
vatRate = 25.00F,
vatCountryCode = "NO",
type = FarePart.Type.FLEX,
unitType = FarePart.UnitType.MINUTE,
units = 1F,
scaleFrom = 0F,
scaleType = FarePart.ScaleType.MINUTE,
),
),
)

val finalFare
get() =
Fare(
estimated = false,
description = "string",
propertyClass = "string",
parts = listOf(farePartFixedFinalPart),
parts =
listOf(
FarePart(
amount = 50.00F,
amountExVat = 40.00F,
currencyCode = "NOK",
vatRate = 25.00F,
vatCountryCode = "NO",
type = FarePart.Type.FIXED,
),
),
)

This file was deleted.

13 changes: 4 additions & 9 deletions src/main/kotlin/no/entur/shared/mobility/to/ref/data/Leg.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ package no.entur.shared.mobility.to.ref.data
import no.entur.shared.mobility.to.ref.dto.Leg
import no.entur.shared.mobility.to.ref.dto.LegState
import java.time.OffsetDateTime
import java.util.UUID

val leg
get() =
Leg(
id = "string",
id = UUID.randomUUID().toString(),
from = place,
departureTime = OffsetDateTime.now(),
arrivalTime = null,
actualArrivalTime = null,
actualDepartureTime = OffsetDateTime.now(),
assetType = assetType,
asset = asset,
Expand All @@ -23,11 +22,9 @@ val leg
val legWithoutDeposit
get() =
Leg(
id = "string",
id = UUID.randomUUID().toString(),
from = place,
departureTime = OffsetDateTime.now(),
arrivalTime = null,
actualArrivalTime = null,
actualDepartureTime = OffsetDateTime.now(),
assetType = assetType,
asset = asset,
Expand All @@ -39,11 +36,9 @@ val legWithoutDeposit
val legWithHighDepositAmount
get() =
Leg(
id = "string",
id = UUID.randomUUID().toString(),
from = place,
departureTime = OffsetDateTime.now(),
arrivalTime = null,
actualArrivalTime = null,
actualDepartureTime = OffsetDateTime.now(),
assetType = assetType,
asset = asset,
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 789d2dc

Please sign in to comment.