public void TestConstructor () { Sequence seq = new Sequence( AlphabetType.DNA, "atcg" ); Match m = new Match( voidPattern, seq, 3, 2, +1, 1 ); Assert.AreEqual( 3, m.Start ); Assert.AreEqual( 2, m.Length ); Assert.AreEqual( 1, m.Strand ); Assert.AreEqual( seq, m.BaseSequence ); Assert.AreEqual( "cg", m.Letters() ); Assert.AreEqual( 1.0, m.Similarity, 1e-3 ); }
public void TestSetMatch () { Sequence seq = new Sequence( AlphabetType.DNA, "atcg" ); Match m1 = new Match( null ); Match m2 = new Match( null ); m1.Set( seq, 3, 2, +1, 0.5 ); m2.Set( m1 ); Assert.AreEqual( seq, m2.BaseSequence ); Assert.AreEqual( 3, m2.Start ); Assert.AreEqual( 2, m2.Length ); Assert.AreEqual( 1, m2.Strand ); Assert.AreEqual( 0.5, m2.Similarity, 1e-3 ); Assert.AreEqual( "cg", m2.Letters() ); }