mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
20 lines
761 B
Java
20 lines
761 B
Java
package com.thealgorithms.maths;
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
class StrobogrammaticNumberTest {
|
|
|
|
@Test
|
|
void testIsStrobogrammatic() {
|
|
StrobogrammaticNumber strobogrammaticNumber = new StrobogrammaticNumber();
|
|
assertThat(strobogrammaticNumber.isStrobogrammatic("69")).isTrue();
|
|
assertThat(strobogrammaticNumber.isStrobogrammatic("88")).isTrue();
|
|
assertThat(strobogrammaticNumber.isStrobogrammatic("818")).isTrue();
|
|
assertThat(strobogrammaticNumber.isStrobogrammatic("101")).isTrue();
|
|
assertThat(strobogrammaticNumber.isStrobogrammatic("609")).isTrue();
|
|
assertThat(strobogrammaticNumber.isStrobogrammatic("120")).isFalse();
|
|
}
|
|
}
|