Package structure

Source Code of structure.TestCramHeader

package structure;

import static org.junit.Assert.*;
import static org.junit.Assert.fail;

import java.io.IOException;
import java.io.InputStream;

import net.sf.cram.ReadWrite;
import net.sf.cram.ReadWrite.CramHeader;

import org.junit.Assert;
import org.junit.Test;

public class TestCramHeader {

  @Test
  public void test() throws IOException {

    String cramPath = "/data/set1/small.cram";
    InputStream stream = getClass().getResourceAsStream(
        cramPath);

    if (stream == null)
      fail("CRAM file not found: " + cramPath);

    CramHeader cramHeader = ReadWrite.readCramHeader(stream);

    assertNotNull(cramHeader);
    assertEquals(cramHeader.majorVersion, 1) ;
    assertEquals(cramHeader.minorVersion, 1) ;
    assertNotNull(cramHeader.samFileHeader) ;
  }

}
TOP

Related Classes of structure.TestCramHeader

TOP
Copyright © 2018 www.massapi.com. 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.