Skip to content

Commit af52769

Browse files
committed
Make the properties of Hastus data classes public, as hiding them hinders
testing.
1 parent 118dbbf commit af52769

6 files changed

Lines changed: 31 additions & 31 deletions

File tree

src/main/kotlin/fi/hsl/jore4/hastus/data/hastus/Place.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ package fi.hsl.jore4.hastus.data.hastus
88
* @constructor Creates a Hastus Place
99
*/
1010
data class Place(
11-
private val identifier: String,
12-
private val description: String
11+
val identifier: String,
12+
val description: String
1313
) : HastusData() {
1414

1515
override fun getFields(): List<Any> = listOf(identifier, description)

src/main/kotlin/fi/hsl/jore4/hastus/data/hastus/Route.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ package fi.hsl.jore4.hastus.data.hastus
1111
* @constructor Create a Route with given values
1212
*/
1313
data class Route(
14-
private val identifier: String,
15-
private val description: String,
16-
private val serviceType: Int = 0,
17-
private val direction: Int = 0,
18-
private val serviceMode: Int
14+
val identifier: String,
15+
val description: String,
16+
val serviceType: Int = 0,
17+
val direction: Int = 0,
18+
val serviceMode: Int
1919
) : HastusData() {
2020

2121
override fun getFields(): List<Any> = listOf(identifier, description, serviceType, direction, serviceMode)

src/main/kotlin/fi/hsl/jore4/hastus/data/hastus/RouteVariant.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ package fi.hsl.jore4.hastus.data.hastus
1212
* @constructor Create a Route variant with the given values
1313
*/
1414
data class RouteVariant(
15-
private val identifier: String,
16-
private val description: String,
17-
private val direction: Int,
18-
private val reversible: Boolean = false,
19-
private val routeIdAndVariantId: String,
20-
private val routeId: String
15+
val identifier: String,
16+
val description: String,
17+
val direction: Int,
18+
val reversible: Boolean = false,
19+
val routeIdAndVariantId: String,
20+
val routeId: String
2121
) : HastusData() {
2222

2323
override fun getFields(): List<Any> =

src/main/kotlin/fi/hsl/jore4/hastus/data/hastus/RouteVariantPoint.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ import fi.hsl.jore4.hastus.data.format.NumberWithAccuracy
1616
* @constructor Create empty Route variant point
1717
*/
1818
data class RouteVariantPoint(
19-
private val place: String?,
20-
private val specTpDistance: NumberWithAccuracy?,
21-
private val isTimingPoint: Boolean,
22-
private val allowLoadTime: Boolean,
23-
private val regulatedTp: Boolean,
24-
private val stopLabel: String,
25-
private val routeIdAndVariantId: String
19+
val place: String?,
20+
val specTpDistance: NumberWithAccuracy?,
21+
val isTimingPoint: Boolean,
22+
val allowLoadTime: Boolean,
23+
val regulatedTp: Boolean,
24+
val stopLabel: String,
25+
val routeIdAndVariantId: String
2626
) : HastusData() {
2727

2828
init {

src/main/kotlin/fi/hsl/jore4/hastus/data/hastus/Stop.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ import fi.hsl.jore4.hastus.data.format.NumberWithAccuracy
1818
* @constructor Create a Hastus Stop with given values
1919
*/
2020
data class Stop(
21-
private val identifier: String,
22-
private val platform: String,
23-
private val descriptionFinnish: String,
24-
private val descriptionSwedish: String,
25-
private val streetFinnish: String,
26-
private val streetSwedish: String,
27-
private val place: String?,
28-
private val gpsX: NumberWithAccuracy,
29-
private val gpsY: NumberWithAccuracy,
30-
private val shortIdentifier: String
21+
val identifier: String,
22+
val platform: String,
23+
val descriptionFinnish: String,
24+
val descriptionSwedish: String,
25+
val streetFinnish: String,
26+
val streetSwedish: String,
27+
val place: String?,
28+
val gpsX: NumberWithAccuracy,
29+
val gpsY: NumberWithAccuracy,
30+
val shortIdentifier: String
3131
) : HastusData() {
3232

3333
override fun getFields(): List<Any> = listOf(

src/main/kotlin/fi/hsl/jore4/hastus/data/hastus/StopDistance.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ package fi.hsl.jore4.hastus.data.hastus
1212
data class StopDistance(
1313
val stopStart: String,
1414
val stopEnd: String,
15-
private val baseInService: Boolean = true,
15+
val baseInService: Boolean = true,
1616
val editedDistance: Int
1717
) : HastusData() {
1818

0 commit comments

Comments
 (0)