This repository was archived by the owner on Feb 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed
main/java/de/kaleidox/vban
test/java/de/kaleidox/test/vban Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 1- # VBAN-API [ ![ Build Status] ( https://travis-ci.com/burdoto/VBAN-API.svg?branch=master )] ( https://travis-ci.com/burdoto/VBAN-API ) [ ![ Maven Central Release] ( https://maven-badges.herokuapp.com/maven-central/de.kaleidox/vban-api/badge.svg )] ( https://maven-badges.herokuapp.com/maven-central/de.kaleidox/vban-api ) [ ![ Development Release] ( https://jitpack.io/v/burdoto/VBAN-API.svg )] ( https://jitpack.io/#burdoto/VBAN-API )
1+ # VBAN-API [ ![ Build Status] ( https://travis-ci.com/burdoto/VBAN-API.svg?branch=master )] ( https://travis-ci.com/burdoto/VBAN-API ) [ ![ Javadocs ] ( http://javadoc.io/badge/de.kaleidox/vban-api.svg )] ( http://javadoc.io/doc/de.kaleidox/vban-api ) [ ![ Maven Central Release] ( https://maven-badges.herokuapp.com/maven-central/de.kaleidox/vban-api/badge.svg )] ( https://maven-badges.herokuapp.com/maven-central/de.kaleidox/vban-api ) [ ![ Development Release] ( https://jitpack.io/v/burdoto/VBAN-API.svg )] ( https://jitpack.io/#burdoto/VBAN-API )
22API for the known VB-Audio VBAN Network interface
33
44
Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ public static byte[] createByteArray(Object data) {
8585 * and if not, throws an {@link IllegalArgumentException}.
8686 *
8787 * @param check The int to check range of.
88- * @param from The minimum value.
89- * @param to The maximum value.
88+ * @param from The minimum value.
89+ * @param to The maximum value.
9090 * @throws IllegalArgumentException If the integer is out of bounds.
9191 */
9292 public static void checkRange (int check , int from , int to ) throws IllegalArgumentException {
Original file line number Diff line number Diff line change 1+ package de .kaleidox .test .vban ;
2+
3+ import org .junit .Test ;
4+
5+ import static de .kaleidox .vban .Util .checkRange ;
6+
7+ public class UtilsTest {
8+ @ Test
9+ public void testWithinBounds () {
10+ checkRange (5 , 0 , 10 );
11+ checkRange (0 , 0 , 10 );
12+ checkRange (10 , 0 , 10 );
13+ }
14+
15+ @ Test (expected = IllegalArgumentException .class )
16+ public void testOutOfLowerBounds () {
17+ checkRange (-1 , 0 , 255 );
18+ }
19+
20+ @ Test (expected = IllegalArgumentException .class )
21+ public void testOutOfUpperBounds () {
22+ checkRange (256 , 0 , 255 );
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments