Package htsjdk.samtools

# Class SAMTestUtil

java.lang.Object
htsjdk.samtools.SAMTestUtil

public class SAMTestUtil extends Object
Misc methods for SAM-related unit tests. These are in the src tree rather than the tests tree so that they will be included in sam.jar, and therefore can be used by tests outside of htsjdk.samtools.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`SAMTestUtil.SanityCheckFailedException`
Indicates that a required sanity-check condition was not met.

## Constructor Summary

Constructors
Constructor
Description
`SAMTestUtil()`

## Method Summary

Modifier and Type
Method
Description
`void`
`assertPairValid(SAMRecord firstEnd, SAMRecord secondEnd)`
Basic sanity check for a pair of SAMRecords.
`static void`
`assertReadValid(SAMRecord read)`
Basic sanity check for a SAMRecord.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SAMTestUtil

public SAMTestUtil()

## Method Details

### assertPairValid

public void assertPairValid(SAMRecord firstEnd, SAMRecord secondEnd) throws SAMTestUtil.SanityCheckFailedException
Basic sanity check for a pair of SAMRecords.

Throws:
  `SAMTestUtil.SanityCheckFailedException` - if the sanity check failed

### assertReadValid

public static void assertReadValid(SAMRecord read) throws SAMTestUtil.SanityCheckFailedException
Basic sanity check for a SAMRecord. Print errors to screen.

Parameters:
  `read` - SAM record
Throws:
  `IllegalArgumentException` - if read is null
  `SAMTestUtil.SanityCheckFailedException` - if errors