mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Improve a few assertion fails in tests
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=135479183
This commit is contained in:
parent
b62e60ed7e
commit
aaa84d6ec6
5 changed files with 12 additions and 31 deletions
|
@ -15,7 +15,6 @@
|
|||
package google.registry.monitoring.metrics;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
@ -123,12 +122,9 @@ public class CounterTest {
|
|||
"vdn",
|
||||
ImmutableSet.of(LabelDescriptor.create("label1", "bar")));
|
||||
|
||||
try {
|
||||
counter.incrementBy(-1L, "foo");
|
||||
fail("Test should not allow non-negative offsets");
|
||||
} catch (IllegalArgumentException expected) {
|
||||
assertThat(expected).hasMessage("The offset provided must be non-negative");
|
||||
}
|
||||
thrown.expect(IllegalArgumentException.class);
|
||||
thrown.expectMessage("The offset provided must be non-negative");
|
||||
counter.incrementBy(-1L, "foo");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue