BAEL-2074: IllegalArgumentException -> IllegalStateException
This commit is contained in:
parent
4f84edd07a
commit
c486b975a5
|
@ -32,7 +32,7 @@ public class Message {
|
||||||
|
|
||||||
private void verifyTextOrFile() {
|
private void verifyTextOrFile() {
|
||||||
if (text != null && file != null) {
|
if (text != null && file != null) {
|
||||||
throw new IllegalArgumentException("Cannot send 'text' and 'file'.");
|
throw new IllegalStateException("Cannot send 'text' and 'file'.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class BuilderWithCustomSetterUnitTest {
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalStateException.class)
|
||||||
public void givenBuilderWithCustomSetter_TestTextAndFile() {
|
public void givenBuilderWithCustomSetter_TestTextAndFile() {
|
||||||
Message message = Message.builder()
|
Message message = Message.builder()
|
||||||
.sender("user@somedomain.com")
|
.sender("user@somedomain.com")
|
||||||
|
|
Loading…
Reference in New Issue