-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
213 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
roborazzi/src/test/java/com/github/takahirom/roborazzi/Devices.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package com.github.takahirom.roborazzi | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
import nl.adaptivity.xmlutil.serialization.XmlElement | ||
import nl.adaptivity.xmlutil.serialization.XmlSerialName | ||
|
||
@Serializable | ||
@XmlSerialName("devices", namespace = "http://schemas.android.com/sdk/devices/1", prefix = "d") | ||
data class Devices(val devices: List<Device>) | ||
|
||
@Serializable | ||
@XmlSerialName("device", namespace = "http://schemas.android.com/sdk/devices/1", prefix = "d") | ||
data class Device( | ||
@XmlElement(value = true) | ||
val name: String, | ||
val hardware: Hardware, | ||
@XmlElement(value = true) | ||
@SerialName("tag-id") | ||
val tagId: String?, | ||
) | ||
|
||
@Serializable | ||
@XmlSerialName("hardware", namespace = "http://schemas.android.com/sdk/devices/1", prefix = "d") | ||
data class Hardware( | ||
val screen: Screen, | ||
@XmlElement(value = true) | ||
val nav: String, | ||
) | ||
|
||
@Serializable | ||
@XmlSerialName("screen", namespace = "http://schemas.android.com/sdk/devices/1", prefix = "d") | ||
data class Screen( | ||
@XmlElement(value = true) | ||
@SerialName("screen-size") | ||
val screenSize: String, | ||
@XmlElement(value = true) | ||
@SerialName("screen-ratio") | ||
val screenRatio: String, | ||
@XmlElement(value = true) | ||
@SerialName("pixel-density") | ||
val pixelDensity: String, | ||
@XmlElement(value = true) | ||
val dimensions: Dimensions | ||
) | ||
|
||
@Serializable | ||
@XmlSerialName("dimensions", namespace = "http://schemas.android.com/sdk/devices/1", prefix = "d") | ||
data class Dimensions( | ||
@XmlElement(value = true) | ||
@SerialName("x-dimension") | ||
val xDimension: Int, | ||
@XmlElement(value = true) | ||
@SerialName("y-dimension") | ||
val yDimension: Int | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.