All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.umlg.tests.inheritencetest.TestInheritence Maven / Gradle / Ivy

The newest version!
package org.umlg.tests.inheritencetest;

import org.junit.Assert;
import org.junit.Test;
import org.umlg.concretetest.God;
import org.umlg.inheritencetest.Mamal;
import org.umlg.runtime.test.BaseLocalDbTest;

public class TestInheritence extends BaseLocalDbTest {

	@Test
	public void testInheritence() {
		God god = new God(true);
		god.setName("THEGOD");
		Mamal mamal1 = new Mamal(god);
		mamal1.setName("mamal1");
		Mamal mamal2 = new Mamal(god);
		mamal2.setName("mamal2");
        db.commit();
		Assert.assertEquals(2, countVertices());
		Assert.assertEquals(2, countEdges());
		God g = new God(god.getVertex());
		Assert.assertEquals(2, g.getAbstractSpecies().size());
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy