20212223242526
testname = "testname"; } @Test(expected = NullPointerException.class) public void shouldThrowNullPointerExceptionIfNameIsNull() { new BooleanMetricValue(null, false); }
2526272829303132
new BooleanMetricValue(null, false); } @Test public void shouldReturnSpecifiedName() { BooleanMetricValue value = new BooleanMetricValue(testname, true); assertThat(value.getMetricName(), is(equalTo(testname))); }
3233343536373839
} @Test public void shouldReturnTrueAsYes() { String testname = "testname"; BooleanMetricValue value = new BooleanMetricValue(testname, true); assertThat(value.getBrowserText(), is(equalTo("Yes"))); }
4041424344454647
@Test public void shouldReturnFalseAsNo() { String testname = "testname"; BooleanMetricValue value = new BooleanMetricValue(testname, false); assertThat(value.getBrowserText(), is(equalTo("No"))); }