Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
StringEncoderAbstractTest.testEncodeNull no test actually throw Encod…
…erException
  • Loading branch information
nhojpatrick committed Feb 13, 2022
commit a5fcecf93a71d50de1606a83e9c4cf8f773cb962
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ limitations under the License.
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- Fix to build on JDK 7: version 4.0.0 requires Java 8. -->
<!-- Can be dropped when CP 49 is released -->
<commons.felix.version>3.5.1</commons.felix.version>
<commons.componentid>codec</commons.componentid>
<commons.module.name>org.apache.commons.codec</commons.module.name>
<commons.jira.id>CODEC</commons.jira.id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@

import org.junit.Assert;
import org.junit.Test;
import org.junit.jupiter.api.function.Executable;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.jupiter.api.Assertions.assertThrows;

/**
*/
Expand Down Expand Up @@ -59,13 +65,9 @@ public void testEncodeEmpty() throws Exception {
}

@Test
public void testEncodeNull() throws Exception {
public void testEncodeNull() throws EncoderException {
final StringEncoder encoder = this.getStringEncoder();
try {
encoder.encode(null);
} catch (final EncoderException ee) {
// An exception should be thrown
}
encoder.encode(null);
}

@Test
Expand Down