Skip to content

Commit

Permalink
Added IdFinderNG
Browse files Browse the repository at this point in the history
  • Loading branch information
fugerit79 committed Mar 8, 2024
1 parent 9298c74 commit fb96af6
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- IdFinderNG

## [8.5.2] - 2024-03-08

### Added
Expand Down
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 + "]";
}

}
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() );
}

}

0 comments on commit fb96af6

Please sign in to comment.