Package de.ailis.jollada.model

Examples of de.ailis.jollada.model.MaterialInstance


        catch (final URISyntaxException e)
        {
            throw new ParserException(targetString + " is not a valid URI: "
                + e, e);
        }
        this.materialInstance = new MaterialInstance(symbol, target);
        this.materialInstance.setName(attributes.getValue("name"));
        this.materialInstance.setSid(attributes.getValue("sid"));
        enterElement(ParserMode.INSTANCE_MATERIAL);
    }
View Full Code Here


     */

    @Test
    public void testConstructor() throws URISyntaxException
    {
        final MaterialInstance instance = new MaterialInstance("SYMBOL",
            new URI("foo"));
        assertEquals("SYMBOL", instance.getSymbol());
        assertEquals(new URI("foo"), instance.getTarget());
        assertNull(instance.getName());
        assertNull(instance.getSid());
    }
View Full Code Here

     */

    @Test(expected = IllegalArgumentException.class)
    public void testConstructorWithFirstNull() throws URISyntaxException
    {
        new MaterialInstance(null, new URI("foo")).toString();
    }
View Full Code Here

     */

    @Test(expected = IllegalArgumentException.class)
    public void testConstructorWithSecondNull() throws URISyntaxException
    {
        new MaterialInstance("SYMBOL", null).toString();
    }
View Full Code Here

     */

    @Test
    public void testSid() throws URISyntaxException
    {
        final MaterialInstance instance = new MaterialInstance("SYMBOL",
            new URI("foo"));
        assertNull(instance.getSid());
        instance.setSid("foo");
        assertEquals("foo", instance.getSid());
        instance.setSid(null);
        assertNull(instance.getSid());
    }
View Full Code Here

     */

    @Test
    public void testName() throws URISyntaxException
    {
        final MaterialInstance instance = new MaterialInstance("SYMBOL",
            new URI("foo"));
        assertNull(instance.getName());
        instance.setName("foo");
        assertEquals("foo", instance.getName());
        instance.setName(null);
        assertNull(instance.getName());
    }
View Full Code Here

     */

    @Test
    public void testTarget() throws URISyntaxException
    {
        final MaterialInstance instance = new MaterialInstance("SYMBOL",
            new URI("foo"));
        assertEquals(new URI("foo"), instance.getTarget());
        instance.setTarget(new URI("bar"));
        assertEquals(new URI("bar"), instance.getTarget());
    }
View Full Code Here

     */

    @Test(expected = IllegalArgumentException.class)
    public void testNullTarget() throws URISyntaxException
    {
        new MaterialInstance("SYMBOL", new URI("foo")).setTarget(null);
    }
View Full Code Here

     */

    @Test
    public void testSymbol() throws URISyntaxException
    {
        final MaterialInstance instance = new MaterialInstance("SYMBOL",
            new URI("foo"));
        assertEquals("SYMBOL", instance.getSymbol());
        instance.setSymbol("foo");
        assertEquals("foo", instance.getSymbol());
    }
View Full Code Here

     */

    @Test(expected = IllegalArgumentException.class)
    public void testNullSymbol() throws URISyntaxException
    {
        new MaterialInstance("SYMBOL", new URI("foo")).setSymbol(null);
    }
View Full Code Here

TOP

Related Classes of de.ailis.jollada.model.MaterialInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.