Skip to content

Commit

Permalink
increase code coverage by testing private constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
johnscancella committed Apr 27, 2017
1 parent 75cedbe commit e2e2a70
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
package gov.loc.repository.bagit.reader;

import java.lang.reflect.InvocationTargetException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
import java.nio.file.Paths;

import org.junit.Assert;
import org.junit.Test;

import gov.loc.repository.bagit.PrivateConstructorTest;
import gov.loc.repository.bagit.exceptions.InvalidBagMetadataException;

public class KeyValueReaderTest extends Assert {
public class KeyValueReaderTest extends PrivateConstructorTest {

@Test
public void testClassIsWellDefined() throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException{
assertUtilityClassWellDefined(KeyValueReader.class);
}

@Test(expected=InvalidBagMetadataException.class)
public void testReadInproperIndentedBagMetadataFileThrowsException() throws Exception{
Expand Down

0 comments on commit e2e2a70

Please sign in to comment.