mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-30 11:09:22 +07:00
(cherry picked from commit 0d22d640ea4ee77a6bdfb5b4af504332e7456b68) IJ-MR-150371 GitOrigin-RevId: 04a5fe47cf874ae78c5ad73282b55123f55e84cb
21 lines
481 B
Java
21 lines
481 B
Java
// "Assert with JUnit 3 'assertNotNull(s)'" "true-preview"
|
|
|
|
import junit.framework.TestCase;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
public class SomeJUnit3Test extends TestCase {
|
|
@Nullable
|
|
String getNullableString() {
|
|
double random = Math.random();
|
|
if (random > 0.75) return null;
|
|
if (random > 0.50) return "";
|
|
else return "bruh";
|
|
}
|
|
|
|
public void test() {
|
|
String s = getNullableString();
|
|
assertNotNull(s);
|
|
assertTrue(s.isEmpty());
|
|
}
|
|
}
|