Skip to content

Commit

Permalink
chore: remove deprecated method (#95)
Browse files Browse the repository at this point in the history
* chore: remove internal deprecated method

* chore: fix indents

* chore: use try catch

* chore: reverts public method

* chore: update review changes
  • Loading branch information
Praful Makani committed Jan 18, 2020
1 parent a5df219 commit eab8f27
Showing 1 changed file with 7 additions and 6 deletions.
Expand Up @@ -21,9 +21,8 @@
import static org.junit.Assert.assertNull;

import com.google.cloud.bigquery.spi.v2.BigQueryRpc;
import org.junit.Rule;
import org.junit.Assert;
import org.junit.Test;
import org.junit.rules.ExpectedException;

public class OptionTest {

Expand All @@ -36,8 +35,6 @@ public class OptionTest {
private static final Option OPTION_NOT_EQUALS1 = new Option(RPC_OPTION, OTHER_VALUE) {};
private static final Option OPTION_NOT_EQUALS2 = new Option(ANOTHER_RPC_OPTION, VALUE) {};

@Rule public ExpectedException thrown = ExpectedException.none();

@Test
public void testEquals() {
assertEquals(OPTION, OPTION_EQUALS);
Expand All @@ -57,7 +54,11 @@ public void testConstructor() {
Option option = new Option(RPC_OPTION, null) {};
assertEquals(RPC_OPTION, option.getRpcOption());
assertNull(option.getValue());
thrown.expect(NullPointerException.class);
new Option(null, VALUE) {};
try {
new Option(null, VALUE) {};
Assert.fail();
} catch (NullPointerException expected) {

}
}
}

0 comments on commit eab8f27

Please sign in to comment.