/*--------------------------------------------------------------------------
 *  Copyright 2009 utgenome.org
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *--------------------------------------------------------------------------*/
//--------------------------------------
// utgb-core Project
//
// BED2SilkTest.java
// Since: 2009/05/19
//
// $URL$ 
// $Author$
//--------------------------------------
package org.utgenome.format.bed;

import org.junit.Test;
import org.xerial.util.FileResource;
import org.xerial.util.log.Logger;

public class BED2SilkTest {
	private static Logger _logger = Logger.getLogger(BED2SilkTest.class);

	@Test
	public void test() throws Exception {
		BED2Silk b2s = new BED2Silk(FileResource.open(BED2SilkTest.class, "small.bed"));
		String s = b2s.toSilk();
		_logger.info(s);
	}
}

@@ -991,22 +991,171 @@
 ort 
-org.junit.Test
+static org.junit.Assert.assertEquals;%0D%0A%0D%0Aimport java.io.StringReader;%0D%0A%0D%0Aimport org.junit.Test;%0D%0Aimport org.xerial.lens.Lens;%0D%0Aimport org.xerial.lens.ObjectHandler
 ;%0D%0Ai
@@ -1492,16 +1492,16 @@
 ilk();%0D%0A
-
 %09%09_logge
@@ -1512,15 +1512,775 @@
 fo(s);%0D%0A
+%09%09Lens.findFromSilk(new StringReader(s), %22gene%22, BEDGene.class, new ObjectHandler%3CBEDGene%3E() %7B%0D%0A%09%09%09public void handle(BEDGene g) throws Exception %7B%0D%0A%09%09%09%09if (g.getName().equals(%22Pos1%22)) %7B%0D%0A%09%09%09%09%09assertEquals(%22chr7%22, g.coordinate);%0D%0A%09%09%09%09%09assertEquals(127471197, g.getStart());%0D%0A%09%09%09%09%09assertEquals(127472364, g.getEnd());%0D%0A%09%09%09%09%09assertEquals('+', g.getStrand());%0D%0A%09%09%09%09%09assertEquals(%22#ff0000%22, g.getColor());%0D%0A%09%09%09%09%7D%0D%0A%09%09%09%09else if (g.getName().equals(%22Pos2%22)) %7B%0D%0A%09%09%09%09%09//127472363%09127473530%09Pos2%09200%09+%09127472363%09127473530%09255,0,0%0D%0A%09%09%09%09%09assertEquals(%22chr7%22, g.coordinate);%0D%0A%09%09%09%09%09assertEquals(127472364, g.getStart());%0D%0A%09%09%09%09%09assertEquals(127473531, g.getEnd());%0D%0A%09%09%09%09%09assertEquals('+', g.getStrand());%0D%0A%09%09%09%09%09assertEquals(%22#ff0000%22, g.getColor());%0D%0A%09%09%09%09%7D%0D%0A%09%09%09%7D%0D%0A%0D%0A%09%09%7D);%0D%0A%0D%0A
 %09%7D%0D%0A%7D%0D%0A

add BED2Silk test