-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HBX-2390: Create a JBoss Tools adaptation layer in Hibernate Tools
- Add new initial test class 'org.hibernate.tool.orm.jbt.wrp.TableWrapperTest' - Create new implementation class 'org.hibernate.tool.orm.jbt.wrp.TableWrapper' extending 'org.hibernate.mapping.Table' and 'org.hibernate.tool.orm.jbt.wrp.Wrapper' Signed-off-by: Koen Aers <[email protected]>
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
jbt/src/main/java/org/hibernate/tool/orm/jbt/wrp/TableWrapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.hibernate.tool.orm.jbt.wrp; | ||
|
||
import org.hibernate.mapping.Table; | ||
|
||
public class TableWrapper extends Table implements Wrapper { | ||
|
||
public TableWrapper(String name) { | ||
super("HibernateTools", name); | ||
} | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
jbt/src/test/java/org/hibernate/tool/orm/jbt/wrp/TableWrapperTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.hibernate.tool.orm.jbt.wrp; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
|
||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class TableWrapperTest { | ||
|
||
private TableWrapper tableWrapper = null; | ||
|
||
@BeforeEach | ||
public void beforeEach() { | ||
tableWrapper = new TableWrapper("foo"); | ||
} | ||
|
||
@Test | ||
public void testConstruction() { | ||
assertNotNull(tableWrapper); | ||
assertEquals("foo", tableWrapper.getName()); | ||
} | ||
|
||
} |