package org.sbolstandard.core2.Testing;

import static org.junit.Assert.*;

import java.net.URI;
import java.util.Arrays;
import java.util.HashSet;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.sbolstandard.core2.ComponentDefinition;
import org.sbolstandard.core2.SBOLDocument;
import org.sbolstandard.core2.Sequence;

public class SequenceTest {
	private Sequence s2 = null;
	private SBOLDocument doc = null;
	private Sequence generic_seq = null;
	@Before
	public void setUp() throws Exception 
	{
		String prURI="http://partsregistry.org";
		doc = new SBOLDocument();
		doc.setDefaultURIprefix(prURI);
		doc.setTypesInURIs(false);
		generic_seq = doc.createSequence("generic_seq", "ttgacagctagctcagtcctaggtataatgctagc", Sequence.IUPAC_DNA);

	}

	@After
	public void tearDown() throws Exception {
	}


	@Test
	public void test_toString()
	{	
		String generic_seq_string = "generic_seq" + '@' + Integer.toHexString(generic_seq.hashCode());
		equals(doc.getSequence("generic_seq", "").toString() == generic_seq_string);
	}
	

}

@@ -664,16 +664,41 @@
 false);%0A
+%09%09doc.setComplete(true);%0A
 %09%09generi
@@ -906,129 +906,224 @@
 %09%0A%09%09
-String generic_seq_string = %22generic_seq%22 + '@' + Integer.toHexString(generic_seq.hashCode());%0A%09%09equals(doc.getSequence(%22
+assertTrue(doc.getSequence(%22generic_seq%22, %22%22).toString().length() != 0);%0A%09%09assertNotNull(generic_seq.toString());%0A%09%09assertTrue(generic_seq.toString().contains(%22displayId=%22+generic_seq.getDisplayId()));%0A%09%09assertTrue(!
 gene
@@ -1121,38 +1121,32 @@
 rue(!generic_seq
-%22, %22%22)
 .toString() == g
@@ -1144,30 +1144,53 @@
 ng()
- == generic_seq_string
+.contains(%22name=%22+generic_seq.getDisplayId())
 );%0A%09

set completeness on Document for stricter testing fixed toString method to call the correct method