package nl.tudelft.lifetiles.graph.models;

import nl.tudelft.lifetiles.graph.models.FactoryProducer;
import nl.tudelft.lifetiles.graph.models.GraphFactory;
import nl.tudelft.lifetiles.graph.models.jgrapht.JGraphTGraphFactory;

import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

public class FactoryProducerTest {
    FactoryProducer<String> fp;
    @Rule
    public ExpectedException thrown= ExpectedException.none();

    @Before
    public void setUp() throws Exception {
        fp = new FactoryProducer<String>();
    }

    @Test
    public void testGetWithParam() {
        GraphFactory<String> gf = fp.getFactory("JGraphT");
        assert (gf instanceof JGraphTGraphFactory<?>);
    }

    @Test
    public void testGetWrongParam() {
        thrown.expect(IllegalArgumentException.class);
        GraphFactory<String> gf = fp.getFactory("libfoo");
    }

    @Test
    public void testGet() {
        GraphFactory<String> gf = fp.getFactory();
        assert (gf instanceof JGraphTGraphFactory<?>);
    }

}

@@ -41,121 +41,8 @@
 s;%0A%0A
-import nl.tudelft.lifetiles.graph.models.FactoryProducer;%0Aimport nl.tudelft.lifetiles.graph.models.GraphFactory;%0A
 impo
@@ -334,16 +334,17 @@
 n thrown
+ 
 = Expect
@@ -753,34 +753,8 @@
     
- GraphFactory%3CString%3E gf =
  fp.

Remove redundant variable.