Skip to content

Commit c198a96

Browse files
eralmas7zhendrikse
authored andcommitted
Pre conditions (eugenp#1128)
* BAL-36 File size api in java and apache commons IO * BAEL-282 grep in java - fixes after code review * BAEL-519 Added support for disruptor library * BAEL-519 Added support for disruptor library * BAEL-519 Added support for disruptor library * BAEL-519 Added support for disruptor library * BAEL-519 Added support for disruptor library * BAEL-519 Added support for disruptor library * BAEL-519 Added support for disruptor * BAEL-519 Moved all supporting classes to main source * BAEL-519 Moved all supporting classes to main source * BAEL-519 Moved asserts and test classes in test folder. * BAEL-519 moved test related producer and consumer to src. * BAEL-586 Guide to Guava BiMap. * BAEL-587 formatted code. * BAEL-519 LMAX Disruptor * BAEL-587 resolved merge * BAEL-587 Resolved merge * BAEL-519 Removed disruptor link. * BAEL-519 Reverted Guava changes * RFQ-587 Added disruptor as a separate module. * BAEL-519 Disruptor changes. * BAEL-519 Removed disruptor from core-java module. * BAEL-637 Guide to PreConditions * BAEL-637 Used assertJ for exception assertion. * BAEL-637 updated tests to use assertJ. * BAEL-637 Removed redundant tests. * BAEL-637 explicitely specify the null varargs. * BAEL-637 explicitely specify the null varargs.
1 parent 071790b commit c198a96

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎guava/src/test/java/org/baeldung/guava/GuavaPreConditionsTest.java‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
package org.baeldung.guava;
22

33
import static org.assertj.core.api.Assertions.assertThatThrownBy;
4-
54
import java.util.Arrays;
6-
75
import org.junit.Test;
8-
9-
import com.google.common.base.Preconditions;
6+
import com.google.common.base.*;
107

118
public class GuavaPreConditionsTest {
129

@@ -61,7 +58,7 @@ public void givenNullString_whenCheckNotNullCalledWithTemplatedMessage_throwsExc
6158
final String nullObject = null;
6259
final String message = "Please check the Object supplied, its %s!";
6360

64-
assertThatThrownBy(() -> Preconditions.checkNotNull(nullObject, message, nullObject)).isInstanceOf(NullPointerException.class).hasMessage(message, nullObject).hasNoCause();
61+
assertThatThrownBy(() -> Preconditions.checkNotNull(nullObject, message, new Object[] { null })).isInstanceOf(NullPointerException.class).hasMessage(message, nullObject).hasNoCause();
6562
}
6663

6764
@Test

0 commit comments

Comments
 (0)