/*
 * $RCSfile: ModelTypeTest.java,v $
 * $Date: 2006/01/24 15:35:13 $
 * $Revision: 1.1 $
 * $Author: xblanc $
 */
 
/*
 * Copyright (c) 2002-2003 IST-2004-2006-511731 ModelWare - ModelBus.
 * All rights reserved.
 *
 * This software is published under the terms of the ModelBus Software License
 * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * A copy of ModelBus Software License is provided with this distribution in
 * doc/LICENSE.txt file.
 */
 
/*
 * ModelTypeTest.java Add description 
 * 
 * @author Prawee Sriplakich
 * @version $Revision: 1.1 $ $Date: 2006/01/24 15:35:13 $
 * @see Add references
 *
 * TODO Add description
 * TODO Add references
 */
package org.eclipse.mddi.modelbus.adapter.test.unit;

import java.util.Collection;

import org.eclipse.mddi.modelbus.adapter.infrastructure.model_manipulation.ModelTypeChecker;
import org.eclipse.mddi.modelbus.description.abstract_.AbstractFactory;
import org.eclipse.mddi.modelbus.description.abstract_.ModelType;

import junit.framework.TestCase;

/**
 * Test the semantics of ModelType checking
 *
 * 
 * @author P. Sriplakich
 *
 *
 */

// TODO in version 1
public class ModelTypeTest extends TestCase {

    public static void main(String[] args) {
        junit.textui.TestRunner.run(ModelTypeTest.class);
    }
    
    public void test_ClassDiagramModelType() {
        AbstractFactory f = Util.abstractFactory;
        ModelType t = f.createModelType();
        // TODO create type defintion
        
        Collection  model = Util.createUml2Model();
        
        assertTrue( ModelTypeChecker.isTypeOf(model, t));
    
    }
    
    
    public void test_sequenceDiagramModelType() {
        AbstractFactory f = Util.abstractFactory;
        ModelType t = f.createModelType();   
        // TODO create type defintion
    
        Collection model = Util.getUmlSequenceDiagramModel();
        assertTrue( ModelTypeChecker.isTypeOf(model, t));        
    }


    
    

}
