package de.tudresden.inf.lat.born.owlapi.example;

import java.util.List;

import org.junit.Assert;
import org.junit.Test;

/**
 * This is a unit test for {@link ExampleLoader}.
 * 
 * @author Julian Mendez
 *
 */
public class ExampleLoaderTest {

	@Test
	public void testGetExampleConfigurations() {
		ExampleLoader loader = new ExampleLoader();
		List<ExampleConfiguration> list = loader.getExampleConfigurations();
		Assert.assertEquals(2, list.size());

		{
			ExampleConfiguration conf0 = list.get(0);
			Assert.assertEquals("example-0", conf0.getOntologyName());
			Assert.assertTrue(conf0.getOntologyFileName().endsWith("/examples/example-0.owl"));
			Assert.assertEquals(
					"query(sub('http://lat.inf.tu-dresden.de/systems/born/born-example#a', 'http://lat.inf.tu-dresden.de/systems/born/born-example#e')).\n\n",
					conf0.getQuery());
		}

		{
			ExampleConfiguration conf1 = list.get(1);
			Assert.assertEquals("example-1", conf1.getOntologyName());
			Assert.assertTrue(conf1.getOntologyFileName().endsWith("/examples/example-1.owl"));
			Assert.assertEquals(
					"query(sub('http://lat.inf.tu-dresden.de/systems/born/born-example#a', 'http://lat.inf.tu-dresden.de/systems/born/born-example#e')).\n\n",
					conf1.getQuery());
		}

	}

}

@@ -437,9 +437,9 @@
 als(
-2
+3
 , li
@@ -1241,14 +1241,409 @@
 );%0A%09%09%7D%0A%0A
+%09%09%7B%0A%09%09%09ExampleConfiguration conf2 = list.get(2);%0A%09%09%09Assert.assertEquals(%22example-2%22, conf2.getOntologyName());%0A%09%09%09Assert.assertTrue(conf2.getOntologyFileName().endsWith(%22/examples/example-2.owl%22));%0A%09%09%09Assert.assertEquals(%0A%09%09%09%09%09%22query(sub('http://lat.inf.tu-dresden.de/systems/born/born-example#a', 'http://lat.inf.tu-dresden.de/systems/born/born-example#e')).%5Cn%5Cn%22,%0A%09%09%09%09%09conf2.getQuery());%0A%09%09%7D%0A%0A
 %09%7D%0A%0A%7D%0A

Fix unit test