Package de.ailis.jollada.model

Source Code of de.ailis.jollada.model.MaterialBindingTest

/*
* Copyright (C) 2010 Klaus Reimer <k@ailis.de>
* See LICENSE.txt for licensing information.
*/

package de.ailis.jollada.model;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import java.net.URI;
import java.net.URISyntaxException;

import org.junit.Test;

import de.ailis.jollada.model.GeometryInstance;
import de.ailis.jollada.model.MaterialBinding;


/**
* Tests the MaterialBinding class.
*
* @author Klaus Reimer (k@ailis.de)
*/

public class MaterialBindingTest
{
    /**
     * Tests the default constructor.
     *
     * @throws URISyntaxException
     *             When URI is invalid.
     */

    @Test
    public void testDefaultConstructor() throws URISyntaxException
    {
        final GeometryInstance instance = new GeometryInstance(new URI("foo"));
        final MaterialBinding binding = new MaterialBinding(instance);
        assertEquals(0, binding.getParams().size());
        assertNotNull(binding.getCommonTechnique());
    }


    /**
     * Tests the constructor with a null parameter.
     */

    @Test(expected = IllegalArgumentException.class)
    public void testNullUrl()
    {
        new MaterialBinding(null).toString();
    }
}
TOP

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

TOP
Copyright © 2018 www.massapi.com. 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.