Exemple #1
0
  public static void checkFile(File file) {
    // Check optional fields
    // NOTE checksum be checked
    Long size = file.getSize();
    if (size != null) {
      assertTrue(file.size >= 0, "File size must be greater than or equal to 0");
    }
    Long bytesTransferred = file.getBytesTransferred();
    if (bytesTransferred != null) {
      assertTrue(bytesTransferred >= 0, "Bytes transferred must be greater than or equal to 0");
    }

    // Check parent type
    checkEntityType(file);
  }