feat(android): import private Shopee probe tasks
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package com.roubao.task
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
class ProbeTaskJsonTest {
|
||||
@Test
|
||||
fun `task document round trips without changing authoritative fields`() {
|
||||
val task = ProbeTask(
|
||||
probeId = "probe_0123456789abcdef",
|
||||
sourceOrderNo = "ORDER_000001",
|
||||
sourceStoreName = "Test Store",
|
||||
title = "Test Product",
|
||||
sku = "SKU-BLACK",
|
||||
quantity = 2,
|
||||
referenceImage = ProbeReferenceImage(
|
||||
relativePath = "assets/0123456789abcdef.jpg",
|
||||
mediaType = "image/jpeg",
|
||||
sizeBytes = 123,
|
||||
sha256 = "a".repeat(64)
|
||||
)
|
||||
)
|
||||
|
||||
assertEquals(listOf(task), ProbeTaskJson.decode(ProbeTaskJson.encode(listOf(task))))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user