Package org.semanticweb.owlapi.change

Examples of org.semanticweb.owlapi.change.AddAxiomData


    public void testCreateOntologyChangeEquals()
            throws OWLOntologyCreationException {
        OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
        OWLOntology ontology = manager.createOntology();
        OWLOntologyID ontologyID = ontology.getOntologyID();
        AddAxiomData addAxiomData = new AddAxiomData(mockAxiom);
        OWLOntologyChangeRecord changeRecord = new OWLOntologyChangeRecord(
                ontologyID, addAxiomData);
        OWLOntologyChange change = changeRecord.createOntologyChange(manager);
        assertNotNull(change);
        assertEquals(change.getOntology().getOntologyID(), ontologyID);
View Full Code Here


    }

    @Nonnull
    @Override
    public AddAxiomData getChangeData() {
        return new AddAxiomData(getAxiom());
    }
View Full Code Here

    @Nonnull
    private final OWLOntology mockOntology = mock(OWLOntology.class);

    @Test
    public void testEquals() {
        AddAxiomData data1 = new AddAxiomData(mockAxiom);
        AddAxiomData data2 = new AddAxiomData(mockAxiom);
        assertEquals(data1, data2);
    }
View Full Code Here

        assertEquals(data1, data2);
    }

    @Test
    public void testOntologyChange() {
        AddAxiomData data = new AddAxiomData(mockAxiom);
        AddAxiom change = data.createOntologyChange(mockOntology);
        assertEquals(change.getOntology(), mockOntology);
        assertEquals(change.getAxiom(), mockAxiom);
    }
View Full Code Here

        assertEquals(change.getAxiom(), mockAxiom);
    }

    @Test
    public void testRoundTripChange() {
        AddAxiomData data = new AddAxiomData(mockAxiom);
        AddAxiom change = new AddAxiom(mockOntology, mockAxiom);
        assertEquals(data, change.getChangeData());
    }
View Full Code Here

@SuppressWarnings({ "javadoc", "null" })
public class NamesTestCase {

    @Test
    public void shoudReturnRightName() throws OWLOntologyCreationException {
        assertEquals("AddAxiomData", new AddAxiomData(mock(OWLAxiom.class)) {

            private static final long serialVersionUID = 1L;

            @Override
            public String getName() {
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.change.AddAxiomData

Copyright © 2018 www.massapicom. 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.