Rewrites FoodExtensionKtTest with matchers

Issue #2745
This commit is contained in:
Ryan Haining 2023-09-23 20:47:17 -07:00
parent d8fe546c9f
commit 0e3647616e

View file

@ -1,10 +1,10 @@
package info.nightscout.plugins.sync.nsclientV3.extensions
import com.google.common.truth.Truth.assertThat
import info.nightscout.database.entities.Food
import info.nightscout.database.entities.embedments.InterfaceIDs
import info.nightscout.sdk.localmodel.food.NSFood
import info.nightscout.sdk.mapper.convertToRemoteAndBack
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
@Suppress("SpellCheckingInspection")
@ -30,7 +30,7 @@ internal class FoodExtensionKtTest {
)
val food2 = (food.toNSFood().convertToRemoteAndBack() as NSFood).toFood()
Assertions.assertTrue(food.contentEqualsTo(food2))
Assertions.assertTrue(food.interfaceIdsEqualsTo(food2))
assertThat(food.contentEqualsTo(food2)).isTrue()
assertThat(food.interfaceIdsEqualsTo(food2)).isTrue()
}
}
}