blob: ef3445fbd56f849890a75fa78938b52a77adb5a3 [file] [log] [blame]
package net.sf.taverna.t2.activities.spreadsheet;
import static org.junit.Assert.*;
import org.junit.Test;
public class SpreadsheetReadExceptionTest {
@Test
public void testSpreadsheetReadException() {
SpreadsheetReadException spreadsheetReadException = new SpreadsheetReadException();
assertNull(spreadsheetReadException.getMessage());
assertNull(spreadsheetReadException.getCause());
}
@Test
public void testSpreadsheetReadExceptionString() {
SpreadsheetReadException spreadsheetReadException = new SpreadsheetReadException("test exception");
assertEquals("test exception", spreadsheetReadException.getMessage());
assertNull(spreadsheetReadException.getCause());
}
@Test
public void testSpreadsheetReadExceptionThrowable() {
Exception exception = new Exception();
SpreadsheetReadException spreadsheetReadException = new SpreadsheetReadException(exception);
assertEquals(exception, spreadsheetReadException.getCause());
}
@Test
public void testSpreadsheetReadExceptionStringThrowable() {
Exception exception = new Exception();
SpreadsheetReadException spreadsheetReadException = new SpreadsheetReadException("test exception", exception);
assertEquals("test exception", spreadsheetReadException.getMessage());
assertEquals(exception, spreadsheetReadException.getCause());
}
}