-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
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
26 changes: 26 additions & 0 deletions
26
fj-core/src/main/java/org/fugerit/java/core/db/daogen/IdFinderNG.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,26 @@ | ||
package org.fugerit.java.core.db.daogen; | ||
|
||
import java.math.BigDecimal; | ||
|
||
public class IdFinderNG { | ||
|
||
private BigDecimal id; | ||
|
||
public BigDecimal getId() { | ||
return id; | ||
} | ||
|
||
public void setId( BigDecimal id ) { | ||
this.id = id; | ||
} | ||
|
||
public void setId( long id ) { | ||
this.setId( new BigDecimal( id ) ); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "IdFinderNG [id=" + id + "]"; | ||
} | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
fj-core/src/test/java/test/org/fugerit/java/core/db/dao/daogen/TestIdFinderNG.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,21 @@ | ||
package test.org.fugerit.java.core.db.dao.daogen; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.fugerit.java.core.db.daogen.IdFinderNG; | ||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
@Slf4j | ||
public class TestIdFinderNG { | ||
|
||
private static final long TEST = 1000L; | ||
|
||
@Test | ||
public void testIdFinderNg() { | ||
IdFinderNG finder = new IdFinderNG(); | ||
finder.setId( TEST ); | ||
log.info( "finder : {}", finder ); | ||
Assert.assertEquals( TEST, finder.getId().longValue() ); | ||
} | ||
|
||
} |