Fix #931
This commit is contained in:
parent
745709ea3c
commit
b02034c6c4
@ -199,9 +199,6 @@ public class SendInvoice extends BotApiMethod<Message> {
|
|||||||
if (Strings.isNullOrEmpty(providerToken)) {
|
if (Strings.isNullOrEmpty(providerToken)) {
|
||||||
throw new TelegramApiValidationException("ProviderToken parameter can't be empty", this);
|
throw new TelegramApiValidationException("ProviderToken parameter can't be empty", this);
|
||||||
}
|
}
|
||||||
if (Strings.isNullOrEmpty(startParameter)) {
|
|
||||||
throw new TelegramApiValidationException("StartParameter parameter can't be empty", this);
|
|
||||||
}
|
|
||||||
if (Strings.isNullOrEmpty(currency)) {
|
if (Strings.isNullOrEmpty(currency)) {
|
||||||
throw new TelegramApiValidationException("Currency parameter can't be empty", this);
|
throw new TelegramApiValidationException("Currency parameter can't be empty", this);
|
||||||
}
|
}
|
||||||
|
@ -67,14 +67,6 @@ public class SendInvoiceTest {
|
|||||||
assertEquals("ProviderToken parameter can't be empty", thrown.getMessage());
|
assertEquals("ProviderToken parameter can't be empty", thrown.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void startParameterCantBeEmpty() {
|
|
||||||
SendInvoice sendInvoice = createSendInvoiceObject();
|
|
||||||
sendInvoice.setStartParameter("");
|
|
||||||
Throwable thrown = assertThrows(TelegramApiValidationException.class, sendInvoice::validate);
|
|
||||||
assertEquals("StartParameter parameter can't be empty", thrown.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void currencyCantBeEmpty() {
|
public void currencyCantBeEmpty() {
|
||||||
SendInvoice sendInvoice = createSendInvoiceObject();
|
SendInvoice sendInvoice = createSendInvoiceObject();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user