This commit is contained in:
rubenlagus 2021-06-25 10:39:45 +02:00 committed by Ruben Bermudez
parent 745709ea3c
commit b02034c6c4
2 changed files with 0 additions and 11 deletions

View File

@ -199,9 +199,6 @@ public class SendInvoice extends BotApiMethod<Message> {
if (Strings.isNullOrEmpty(providerToken)) {
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)) {
throw new TelegramApiValidationException("Currency parameter can't be empty", this);
}

View File

@ -67,14 +67,6 @@ public class SendInvoiceTest {
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
public void currencyCantBeEmpty() {
SendInvoice sendInvoice = createSendInvoiceObject();