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
Expand Up @@ -15,7 +15,7 @@ class OfferId extends TomatoId{
private static final String TYPE = "O"


OfferId(String projectConservedPart, String randomPart, int version) {
OfferId(String projectConservedPart, String randomPart, String version) {
super(TYPE,projectConservedPart,randomPart,version)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ abstract class TomatoId {
*/
private String random
/**
* Version of the identifier which is a number between 0 and 9
* Version of the identifier
*/
private int version
private String version

/**
* Creates an identifier object with the
Expand All @@ -35,7 +35,7 @@ abstract class TomatoId {
* @param randomPart describes the random part of the identifier
* @param version describes the version of the identifier
*/
TomatoId(String type, String projectConservedPart, String randomPart, int version){
TomatoId(String type, String projectConservedPart, String randomPart, String version){
this.type = Objects.requireNonNull(type, "type must not be null")
this.projectConserved = Objects.requireNonNull(projectConservedPart, "projectConservedPart must not be null")
this.random = Objects.requireNonNull(randomPart, "randomPart must not be null")
Expand Down Expand Up @@ -74,7 +74,7 @@ abstract class TomatoId {
* Returns the version of the identifier
* @return
*/
int getVersion() {
String getVersion() {
return version
}
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class OfferSpec extends Specification {
double vat = 0.19
double overhead = 0.2
double net = 900
OfferId offerId = new OfferId("ab", "cd", 1)
OfferId offerId = new OfferId("ab", "cd", "1")
ProductItem item = new ProductItem(2,new Sequencing("DNA Sequencing","This is a sequencing package",1.50, ProductUnit.PER_SAMPLE))

when:
Expand Down Expand Up @@ -57,7 +57,7 @@ class OfferSpec extends Specification {
def "Missing optional Field definitions shall haven null values in an Offer object"() {

given:
OfferId offerId = new OfferId("ab", "cd", 1)
OfferId offerId = new OfferId("ab", "cd", "1")

when:
Offer testOffer =
Expand Down