Merge pull request #256 from RubieV/patch-1

Code cleanup using @Test(expected = Exception)
This commit is contained in:
Nanne 2016-09-15 20:49:24 +02:00 committed by GitHub
commit 0225a7c501

View File

@ -3,7 +3,6 @@ package org.owasp.webgoat.session;
import org.junit.Assert;
import org.junit.Test;
public class LabelDebuggerTest {
@Test
@ -20,16 +19,10 @@ public class LabelDebuggerTest {
Assert.assertFalse(ld.isEnabled());
}
@Test
public void testSetEnabledNullThrowsException() {
@Test(expected = Exception.class)
public void testSetEnabledNullThrowsException() throws Exception {
LabelDebugger ld = new LabelDebugger();
try {
ld.setEnabled(null);
} catch (Exception e) {
// We want to end up here
return;
}
Assert.fail();
}
@Test