diff --git a/app-common/src/test/java/eu/darken/capod/pods/core/apple/misc/FakeAirPodsPro2Test.kt b/app-common/src/test/java/eu/darken/capod/pods/core/apple/misc/FakeAirPodsPro2Test.kt index 11cf7b06..57e77069 100644 --- a/app-common/src/test/java/eu/darken/capod/pods/core/apple/misc/FakeAirPodsPro2Test.kt +++ b/app-common/src/test/java/eu/darken/capod/pods/core/apple/misc/FakeAirPodsPro2Test.kt @@ -31,4 +31,31 @@ class FakeAirPodsPro2Test : BaseAirPodsTest() { model shouldBe PodDevice.Model.FAKE_AIRPODS_PRO2 } } + + /** + * https://discord.com/channels/548521543039189022/927235844127993866/1063027552765087754 + */ + @Test + fun `user supplied`() = runTest { + create("07 13 01 14 20 75 AA 72 39 00 00 6F E4 E4 93 30 00 30 30 30 30") { + rawPrefix shouldBe 0x01.toUByte() + rawDeviceModel shouldBe 0x1420.toUShort() + rawStatus shouldBe 0x75.toUByte() + rawPodsBattery shouldBe 0xAA.toUByte() + rawFlags shouldBe 0x7.toUShort() + rawCaseBattery shouldBe 0x2.toUShort() + rawCaseLidState shouldBe 0x39.toUByte() + rawDeviceColor shouldBe 0x00.toUByte() + rawSuffix shouldBe 0x0.toUByte() + + batteryLeftPodPercent shouldBe 1.0f + batteryRightPodPercent shouldBe 1.0f + + isCaseCharging shouldBe true + + batteryCasePercent shouldBe 0.2f + + model shouldBe PodDevice.Model.FAKE_AIRPODS_PRO2 + } + } } \ No newline at end of file