diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-05-04 14:26:29 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-05-04 14:26:29 +0200 |
commit | 8fba29168e99e86d0a8072adcaafb84337a16eb6 (patch) | |
tree | 801101c3c410fc85e4fee445fa897eef1f411fb8 /yolean/src | |
parent | 8d41cf849b2e56bde07585bcf7ef1c1416b7b49c (diff) |
Use new junit API
Diffstat (limited to 'yolean/src')
-rw-r--r-- | yolean/src/test/java/com/yahoo/yolean/ExceptionsTestCase.java | 11 | ||||
-rw-r--r-- | yolean/src/test/java/com/yahoo/yolean/system/CatchSigTermTestCase.java | 11 |
2 files changed, 11 insertions, 11 deletions
diff --git a/yolean/src/test/java/com/yahoo/yolean/ExceptionsTestCase.java b/yolean/src/test/java/com/yahoo/yolean/ExceptionsTestCase.java index 925371a5f91..db605609926 100644 --- a/yolean/src/test/java/com/yahoo/yolean/ExceptionsTestCase.java +++ b/yolean/src/test/java/com/yahoo/yolean/ExceptionsTestCase.java @@ -1,15 +1,16 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.yolean; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + /** * @author bratseth */ -public class ExceptionsTestCase extends junit.framework.TestCase { - - public ExceptionsTestCase(String name) { - super(name); - } +public class ExceptionsTestCase { + @Test public void testToMessageStrings() { assertEquals("Blah",Exceptions.toMessageString(new Exception("Blah"))); assertEquals("Blah", Exceptions.toMessageString(new Exception(new Exception("Blah")))); diff --git a/yolean/src/test/java/com/yahoo/yolean/system/CatchSigTermTestCase.java b/yolean/src/test/java/com/yahoo/yolean/system/CatchSigTermTestCase.java index 64d1546a61e..056db2d3592 100644 --- a/yolean/src/test/java/com/yahoo/yolean/system/CatchSigTermTestCase.java +++ b/yolean/src/test/java/com/yahoo/yolean/system/CatchSigTermTestCase.java @@ -1,19 +1,18 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.yolean.system; -import com.yahoo.yolean.system.CatchSigTerm; +import org.junit.Test; + import java.util.concurrent.atomic.AtomicBoolean; /** * @author arnej27959 */ -public class CatchSigTermTestCase extends junit.framework.TestCase { - - public CatchSigTermTestCase(String name) { - super(name); - } +public class CatchSigTermTestCase { + @Test public void testThatSetupCompiles() { CatchSigTerm.setup(new AtomicBoolean(false)); } + } |