chore: rename project
This commit is contained in:
27
app/src/test/java/com/logitech/vc/kirbytest/DecoderTest.kt
Normal file
27
app/src/test/java/com/logitech/vc/kirbytest/DecoderTest.kt
Normal file
@@ -0,0 +1,27 @@
|
||||
package com.logitech.vc.kirbytest
|
||||
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Test
|
||||
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
class DecoderTest {
|
||||
@Test
|
||||
fun message_type_0_decodes_correctly() {
|
||||
val res2 = DecoderIaq.parseMeasurement("006b04ab74a1ed0d101404");
|
||||
val testMeasurement = DecoderIaq.Measurement(msgType = 0, co2 = 428, voc = 149, humidity = 44, pressure = 96873, occupancy = 1, pm10 = 4, pm25 = 5, temperature = 24.7 )
|
||||
assertEquals(testMeasurement, res2)
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
fun message_type_1_decodes_correctly() {
|
||||
val res2 = DecoderIaq.parseMeasurement("106b04ab74a1ed0d10");
|
||||
val testMeasurement = DecoderIaq.Measurement(msgType = 1, co2 = 428, voc = 149, humidity = 44, pressure = 96873, occupancy = 1, pm10 = null, pm25 = null, temperature = 24.7 )
|
||||
assertEquals(testMeasurement, res2)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user