@@ -1,10 +1,11 @@
|
||||
package org.bukkit;
|
||||
|
||||
import static org.bukkit.support.MatcherAssert.*;
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import com.google.common.collect.Lists;
|
||||
import java.util.Collection;
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class NoteTest {
|
||||
@Test
|
||||
@@ -51,24 +52,24 @@ public class NoteTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test
|
||||
public void createNoteBelowMin() {
|
||||
new Note((byte) -1);
|
||||
assertThrows(IllegalArgumentException.class, () -> new Note((byte) -1));
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test
|
||||
public void createNoteAboveMax() {
|
||||
new Note((byte) 25);
|
||||
assertThrows(IllegalArgumentException.class, () -> new Note((byte) 25));
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test
|
||||
public void createNoteOctaveBelowMax() {
|
||||
new Note((byte) -1, Note.Tone.A, true);
|
||||
assertThrows(IllegalArgumentException.class, () -> new Note((byte) -1, Note.Tone.A, true));
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test
|
||||
public void createNoteOctaveAboveMax() {
|
||||
new Note((byte) 3, Note.Tone.A, true);
|
||||
assertThrows(IllegalArgumentException.class, () -> new Note((byte) 3, Note.Tone.A, true));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -114,9 +115,9 @@ public class NoteTest {
|
||||
assertEquals(note.getOctave(), 2);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test
|
||||
public void testSharpWrapping2() {
|
||||
new Note(2, Note.Tone.F, true).sharped();
|
||||
assertThrows(IllegalArgumentException.class, () -> new Note(2, Note.Tone.F, true).sharped());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user