@Test public void testDeepCopyOptionsNullBaseUrl() { Options options = new Options(); options.setBaseUrl(null); sequence.setOptions(options); Sequence copy = sequence.deepCopy(); assertNotNull(copy.getOptions()); assertNull(copy.getOptions().getBaseUrl()); }
@Test public void testDeepCopy() { Sequence copy = sequence.deepCopy(); assertNotSame(sequence, copy); assertEquals(sequence.getLength(), copy.getLength()); assertEquals(sequence.getMarkups(), copy.getMarkups()); assertNotSame(sequence.getMarkups(), copy.getMarkups()); assertEquals(sequence.getMetadata(), copy.getMetadata()); assertNotSame(sequence.getMetadata(), copy.getMetadata()); assertEquals(sequence.getMotifs(), copy.getMotifs()); assertNotSame(sequence.getMotifs(), copy.getMotifs()); assertEquals(sequence.getOptions().getBaseUrl(), copy.getOptions().getBaseUrl()); assertNotSame(sequence.getOptions(), copy.getOptions()); assertEquals(sequence.getRegions(), copy.getRegions()); assertNotSame(sequence.getRegions(), copy.getRegions()); }
@Test public void testDeepCopyNullRegions() { sequence.setRegions(null); Sequence copy = sequence.deepCopy(); assertNull(copy.getRegions()); }
@Test public void testDeepCopyNullMetadata() { sequence.setMetadata(null); Sequence copy = sequence.deepCopy(); assertNull(copy.getMetadata()); }