/* * Copyright 2023 Signal Messenger, LLC * SPDX-License-Identifier: AGPL-3.0-only */ package org.thoughtcrime.securesms import org.hamcrest.MatcherAssert import org.hamcrest.Matchers fun T.assertIsNull() { MatcherAssert.assertThat(this, Matchers.nullValue()) } fun T.assertIsNotNull() { MatcherAssert.assertThat(this, Matchers.notNullValue()) } infix fun T.assertIs(expected: T) { MatcherAssert.assertThat(this, Matchers.`is`(expected)) } infix fun T.assertIsNot(expected: T) { MatcherAssert.assertThat(this, Matchers.not(Matchers.`is`(expected))) } infix fun > T.assertIsSize(expected: Int) { MatcherAssert.assertThat(this, Matchers.hasSize(expected)) }