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

org.umlg.tests.primitive.TestPrimitiveRemoval Maven / Gradle / Ivy

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

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

public class TestPrimitiveRemoval extends BaseLocalDbTest {
	
	@Test
	public void testNameRemoval() {
		God g = new God(true);
		g.setName("G");
        db.commit();
		God gTest = new God(g.getVertex());
		Assert.assertNotNull(gTest.getName());
		g.setName(null);
        db.commit();
		gTest = new God(g.getVertex());
		Assert.assertNull(gTest.getName());
	}

    @Test(expected = RuntimeException.class)
    public void testNameAddToOneAlreadySet() {
        God g = new God(true);
        g.setName("G");
        db.commit();
        God gTest = new God(g.getVertex());
        Assert.assertNotNull(gTest.getName());
        g.addToName("asdasdasd");
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy