+ test "Assemble.pair with first sequence longer than second and terminal overlap returns correctly" do
+ e1 = Seq.new(seq_name: "t1", seq: "AGGCGT")
+ e2 = Seq.new(seq_name: "t2", seq: "GT")
+ a = Assemble.pair(e1, e2)
+ assert_equal("t1:overlap=2:hamming=0", a.seq_name)
+ assert_equal("aggcGT", a.seq)
+ end
+
+ test "Assemble.pair with first sequence longer than second and internal overlap returns correctly" do
+ e1 = Seq.new(seq_name: "t1", seq: "AGGCGT")
+ e2 = Seq.new(seq_name: "t2", seq: "GC")
+ a = Assemble.pair(e1, e2)
+ assert_equal("t1:overlap=2:hamming=0", a.seq_name)
+ assert_equal("agGCgt", a.seq)
+ end
+
+ test "Assemble.pair with first sequence longer than second and initial overlap returns correctly" do
+ e1 = Seq.new(seq_name: "t1", seq: "GTCAGA")
+ e2 = Seq.new(seq_name: "t2", seq: "GT")
+ a = Assemble.pair(e1, e2)
+ assert_equal("t1:overlap=2:hamming=0", a.seq_name)
+ assert_equal("GTcaga", a.seq)
+ end
+
+ test "Assemble.pair with first sequence shorter than second and initial overlap returns correctly" do
+ e1 = Seq.new(seq_name: "t1", seq: "AG")
+ e2 = Seq.new(seq_name: "t2", seq: "AGTCAG")
+ a = Assemble.pair(e1, e2)
+ assert_equal("t1:overlap=2:hamming=0", a.seq_name)
+ assert_equal("AGtcag", a.seq)
+ end
+