Skip to content
Permalink
Browse files
Fix broken tests.
  • Loading branch information
garydgregory committed May 5, 2022
1 parent 6518333 commit ac7b6221c6c7608e4a098e3809e7b205f219c5fb
Showing 1 changed file with 7 additions and 18 deletions.
@@ -18,11 +18,12 @@
*/
package org.apache.commons.compress.changes;

import org.apache.commons.compress.archivers.memory.MemoryArchiveEntry;
import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertThrows;

import java.io.PipedInputStream;

import org.apache.commons.compress.archivers.memory.MemoryArchiveEntry;
import org.junit.jupiter.api.Test;

/**
* Unit tests for class {@link Change}.
@@ -32,33 +33,21 @@
**/
public class ChangeTest {


@Test
public void testFailsToCreateChangeTakingFourArgumentsThrowsNullPointerExceptionOne() {

final MemoryArchiveEntry memoryArchiveEntry = new MemoryArchiveEntry("x");

final Change change = new Change(memoryArchiveEntry, null, false);

assertThrows(NullPointerException.class, () -> new Change(memoryArchiveEntry, null, false));
}


@Test
public void testFailsToCreateChangeTakingFourArgumentsThrowsNullPointerExceptionTwo() {

final PipedInputStream pipedInputStream = new PipedInputStream(1);

final Change change = new Change(null, pipedInputStream, false);

assertThrows(NullPointerException.class, () -> new Change(null, pipedInputStream, false));
}


@Test
public void testFailsToCreateChangeTakingThreeArgumentsThrowsNullPointerException() {

final Change change = new Change(null, (-407));

assertThrows(NullPointerException.class, () -> new Change(null, (-407)));
}


}
}

0 comments on commit ac7b622

Please sign in to comment.