Package de.ailis.jollada.model

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

/*
* 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 java.net.URI;
import java.net.URISyntaxException;

import org.junit.Test;

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


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

public class CommonMaterialBindingTechniqueTest
{
    /**
     * 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);
        final CommonMaterialBindingTechnique common = new CommonMaterialBindingTechnique(binding);
        assertEquals(0, common.getMaterialInstances().size());
    }


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

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

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

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.