Package org.aavso.tools.vstar.data.validation

Examples of org.aavso.tools.vstar.data.validation.SimpleTextFormatValidator


  private void commonInvalidTest(String str) throws IOException {
    try {
      CsvReader reader = new CsvReader(new StringReader(str));
      reader.setDelimiter('\t');
      assertTrue(reader.readRecord());
      SimpleTextFormatValidator validator = new SimpleTextFormatValidator(
          reader, 2, 5, NewStarType.NEW_STAR_FROM_SIMPLE_FILE
              .getFieldInfoSource());
      validator.validate();
      // We should have thrown a ObservationValidationError...
      fail();
    } catch (ObservationValidationError e) {
      // We expect to get here.
      assertTrue(true);
View Full Code Here


    CsvReader lineReader = new CsvReader(obsSource);
    lineReader.setDelimiter(delimiter.charAt(0));

    if (NewStarType.NEW_STAR_FROM_SIMPLE_FILE.equals(newStarType)) {
      validator = new SimpleTextFormatValidator(lineReader, newStarType
          .getMinFields(), newStarType.getMaxFields(), newStarType
          .getFieldInfoSource());
    } else if (NewStarType.NEW_STAR_FROM_DOWNLOAD_FILE.equals(newStarType)) {
      validator = new AAVSODownloadFormatValidator(lineReader,
          newStarType.getMinFields(), newStarType.getMaxFields(),
View Full Code Here

TOP

Related Classes of org.aavso.tools.vstar.data.validation.SimpleTextFormatValidator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.