1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-07-13 07:22:56 +00:00
2020-08-16 10:25:09 +02:00

21 lines
499 B
Java

package org.schabi.newpipe.settings.tabs;
import org.junit.Test;
import java.util.HashSet;
import java.util.Set;
import static org.junit.Assert.assertTrue;
public class TabTest {
@Test
public void checkIdDuplication() {
final Set<Integer> usedIds = new HashSet<>();
for (final Tab.Type type : Tab.Type.values()) {
final boolean added = usedIds.add(type.getTabId());
assertTrue("Id was already used: " + type.getTabId(), added);
}
}
}