Update travis yalm
This commit is contained in:
parent
679ad618b9
commit
7b5acf0987
@ -1,7 +1,8 @@
|
||||
language: java
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
- oraclejdk10
|
||||
- oraclejdk11
|
||||
- oraclejdk-ea
|
||||
- openjdk8
|
||||
- openjdk11
|
||||
- openjdk-ea
|
||||
@ -15,4 +16,5 @@ notifications:
|
||||
email: false
|
||||
matrix:
|
||||
allow_failures:
|
||||
- jdk: openjdk-ea
|
||||
- jdk: openjdk-ea
|
||||
- jdk: oraclejdk-ea
|
@ -459,9 +459,7 @@ public class AbilityBotTest {
|
||||
|
||||
Pair<MessageContext, Ability> pair = Pair.of(context, ability);
|
||||
|
||||
Assertions.assertThrows(ArithmeticException.class, () -> {
|
||||
bot.consumeUpdate(pair);
|
||||
});
|
||||
Assertions.assertThrows(ArithmeticException.class, () -> bot.consumeUpdate(pair));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -10,51 +10,37 @@ import static org.telegram.abilitybots.api.bot.DefaultBot.getDefaultBuilder;
|
||||
class AbilityTest {
|
||||
@Test
|
||||
void argumentsCannotBeNegative() {
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
getDefaultBuilder().input(-4).build();
|
||||
});
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> getDefaultBuilder().input(-4).build());
|
||||
}
|
||||
|
||||
@Test
|
||||
void nameCannotBeEmpty() {
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
getDefaultBuilder().name("").build();
|
||||
});
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> getDefaultBuilder().name("").build());
|
||||
}
|
||||
|
||||
@Test
|
||||
void nameCannotBeNull() {
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
getDefaultBuilder().name(null).build();
|
||||
});
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> getDefaultBuilder().name(null).build());
|
||||
}
|
||||
|
||||
@Test
|
||||
void consumerCannotBeNull() {
|
||||
Assertions.assertThrows(NullPointerException.class, () -> {
|
||||
getDefaultBuilder().action(null).build();
|
||||
});
|
||||
Assertions.assertThrows(NullPointerException.class, () -> getDefaultBuilder().action(null).build());
|
||||
}
|
||||
|
||||
@Test
|
||||
void localityCannotBeNull() {
|
||||
Assertions.assertThrows(NullPointerException.class, () -> {
|
||||
getDefaultBuilder().locality(null).build();
|
||||
});
|
||||
Assertions.assertThrows(NullPointerException.class, () -> getDefaultBuilder().locality(null).build());
|
||||
}
|
||||
|
||||
@Test
|
||||
void privacyCannotBeNull() {
|
||||
Assertions.assertThrows(NullPointerException.class, () -> {
|
||||
getDefaultBuilder().privacy(null).build();
|
||||
});
|
||||
Assertions.assertThrows(NullPointerException.class, () -> getDefaultBuilder().privacy(null).build());
|
||||
}
|
||||
|
||||
@Test
|
||||
void nameCannotContainSpaces() {
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||
getDefaultBuilder().name("test test").build();
|
||||
});
|
||||
Assertions.assertThrows(IllegalArgumentException.class, () -> getDefaultBuilder().name("test test").build());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user