Skip to content

Commit 59174db

Browse files
committed
First 4 tests of products are workings
1 parent 4b88fca commit 59174db

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/pl/edu/agh/mwo/invoice/product/Product.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ protected Product(String name, BigDecimal price, BigDecimal tax) {
1616
}
1717

1818
public String getName() {
19-
return null;
19+
return this.name;
2020
}
2121

2222
public BigDecimal getPrice() {
23-
return null;
23+
return this.price;
2424
}
2525

2626
public BigDecimal getTaxPercent() {
27-
return null;
27+
return this.taxPercent;
2828
}
2929

3030
public BigDecimal getPriceWithTax() {
31-
return null;
31+
return this.price.multiply(this.taxPercent).add(this.price);
3232
}
3333
}

0 commit comments

Comments
 (0)