Added PolarParse class - currently commented out as it depends on polar table class. #story[900]main
parent
a4480f3ccf
commit
aeee8ca748
@ -0,0 +1,28 @@
|
|||||||
|
package seng302.Exceptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by f123 on 10-May-17.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An exception thrown when we cannot parse a polar data file.
|
||||||
|
*/
|
||||||
|
public class InvalidPolarFileException extends RuntimeException {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs the exception with a given message.
|
||||||
|
* @param message Message to store.
|
||||||
|
*/
|
||||||
|
public InvalidPolarFileException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs the exception with a given message and cause.
|
||||||
|
* @param message Message to store.
|
||||||
|
* @param cause Cause to store.
|
||||||
|
*/
|
||||||
|
public InvalidPolarFileException(String message, Throwable cause) {
|
||||||
|
super(message, cause);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
package seng302.DataInput;
|
||||||
|
|
||||||
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
import static org.testng.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by f123 on 10-May-17.
|
||||||
|
*/
|
||||||
|
public class PolarParserTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
/**
|
||||||
|
* Tests if we can parse a polar data file (stored in a string), and create a polar table.
|
||||||
|
*/
|
||||||
|
public void testParse() throws Exception {
|
||||||
|
|
||||||
|
|
||||||
|
//Polars = PolarParser.parse("polars/acc_polars.csv");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in new issue