Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright (c) 2025 Contributors to the Eclipse Foundation.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.daanse.example.catalog;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import java.math.BigDecimal;

import org.junit.jupiter.api.Test;

class CatalogModelTest {

@Test
void testPackageInitialized() {
assertNotNull(CatalogPackage.eINSTANCE);
assertNotNull(CatalogFactory.eINSTANCE);
}

@Test
void testCreateCatalog() {
Catalog catalog = CatalogFactory.eINSTANCE.createCatalog();
catalog.setName("Main Catalog");
assertEquals("Main Catalog", catalog.getName());
}

@Test
void testCreateProduct() {
Product product = CatalogFactory.eINSTANCE.createProduct();
product.setName("Widget");
product.setPrice(new BigDecimal("9.99"));
assertEquals("Widget", product.getName());
assertEquals(new BigDecimal("9.99"), product.getPrice());
}
}
17 changes: 0 additions & 17 deletions emf/codegen.maven.example/ecore.copyright/model/vehicle.ecore

This file was deleted.

107 changes: 0 additions & 107 deletions emf/codegen.maven.example/ecore.copyright/pom.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright (c) 2025 Contributors to the Eclipse Foundation.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.daanse.example.extended;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import org.junit.jupiter.api.Test;

class ExtendedModelTest {

@Test
void testPackageInitialized() {
assertNotNull(ExtendedPackage.eINSTANCE);
assertNotNull(ExtendedFactory.eINSTANCE);
}

@Test
void testCreateEmployee() {
Employee employee = ExtendedFactory.eINSTANCE.createEmployee();
employee.setName("Jane");
employee.setEmployeeId("E123");
assertEquals("Jane", employee.getName());
assertEquals("E123", employee.getEmployeeId());
}

@Test
void testCreateCompany() {
Company company = ExtendedFactory.eINSTANCE.createCompany();
company.setName("Acme Corp");
assertEquals("Acme Corp", company.getName());
}
}
20 changes: 0 additions & 20 deletions emf/codegen.maven.example/ecore.fileext/model/config.ecore

This file was deleted.

105 changes: 0 additions & 105 deletions emf/codegen.maven.example/ecore.fileext/pom.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (c) 2025 Contributors to the Eclipse Foundation.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.daanse.example.simple;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import org.junit.jupiter.api.Test;

class SimpleModelTest {

@Test
void testPackageInitialized() {
assertNotNull(SimplePackage.eINSTANCE);
assertNotNull(SimpleFactory.eINSTANCE);
}

@Test
void testCreateItem() {
Item item = SimpleFactory.eINSTANCE.createItem();
item.setName("Test Item");
assertEquals("Test Item", item.getName());
}

@Test
void testCreateContainer() {
Container container = SimpleFactory.eINSTANCE.createContainer();
container.setLabel("Box");
assertEquals("Box", container.getLabel());
}
}
Loading
Loading