summaryrefslogtreecommitdiffstats
path: root/src/test/java/org/bukkit/potion/PotionTest.java
blob: edc308f84751a8a11834dfd6e90f4cca3fa2ad65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package org.bukkit.potion;

import static org.junit.Assert.*;

import org.bukkit.craftbukkit.potion.CraftPotionBrewer;
import org.junit.BeforeClass;
import org.junit.Test;

import net.minecraft.server.MobEffectList;

public class PotionTest {
    @BeforeClass
    public static void setUp() {
        Potion.setPotionBrewer(new CraftPotionBrewer());
        MobEffectList.BLINDNESS.getClass();
        PotionEffectType.stopAcceptingRegistrations();
    }

    @Test
    public void getEffects() {
        for (PotionType type : PotionType.values()) {
            for (PotionEffect effect : new Potion(type).getEffects()) {
                assertTrue(effect.getType() == PotionEffectType.getById(effect.getType().getId()));
            }
        }
    }
}