Skip to content

Commit 8c09e90

Browse files
BENCH-231 added final to TestBuilder constructor parameters
1 parent a684c7a commit 8c09e90

File tree

4 files changed

+19
-21
lines changed

4 files changed

+19
-21
lines changed

src/test/java/com/answerdigital/answerking/builder/AddCategoryRequestTestBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ public AddCategoryRequestTestBuilder withDefaultValues() {
1313
return this;
1414
}
1515

16-
public AddCategoryRequestTestBuilder withName(String name) {
16+
public AddCategoryRequestTestBuilder withName(final String name) {
1717
this.name = name;
1818
return this;
1919
}
2020

21-
public AddCategoryRequestTestBuilder withDescription(String description) {
21+
public AddCategoryRequestTestBuilder withDescription(final String description) {
2222
this.description = description;
2323
return this;
2424
}

src/test/java/com/answerdigital/answerking/builder/CategoryTestBuilder.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,45 +29,43 @@ public CategoryTestBuilder withDefaultValues() {
2929
return this;
3030
}
3131

32-
public CategoryTestBuilder withId(Long id) {
32+
public CategoryTestBuilder withId(final Long id) {
3333
this.id = id;
3434
return this;
3535
}
3636

37-
public CategoryTestBuilder withName(String name) {
37+
public CategoryTestBuilder withName(final String name) {
3838
this.name = name;
3939
return this;
4040
}
4141

42-
public CategoryTestBuilder withDescription(String description) {
42+
public CategoryTestBuilder withDescription(final String description) {
4343
this.description = description;
4444
return this;
4545
}
4646

47-
public CategoryTestBuilder withCreatedOn(String createdOn) {
47+
public CategoryTestBuilder withCreatedOn(final String createdOn) {
4848
this.createdOn = createdOn;
4949
return this;
5050
}
5151

52-
public CategoryTestBuilder withLastUpdated(String lastUpdated) {
52+
public CategoryTestBuilder withLastUpdated(final String lastUpdated) {
5353
this.lastUpdated = lastUpdated;
5454
return this;
5555
}
5656

57-
public CategoryTestBuilder withRetired(boolean retired) {
57+
public CategoryTestBuilder withRetired(final boolean retired) {
5858
this.retired = retired;
5959
return this;
6060
}
6161

62-
public CategoryTestBuilder withProducts(Set<Product> products) {
62+
public CategoryTestBuilder withProducts(final Set<Product> products) {
6363
this.products = products;
6464
return this;
6565
}
6666

67-
public CategoryTestBuilder withProduct(Product product) {
68-
Set<Product> products = new HashSet<>();
67+
public CategoryTestBuilder withProduct(final Product product) {
6968
products.add(product);
70-
this.products = products;
7169
return this;
7270
}
7371

src/test/java/com/answerdigital/answerking/builder/ProductTestBuilder.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,37 +29,37 @@ public ProductTestBuilder withDefaultValues() {
2929
return this;
3030
}
3131

32-
public ProductTestBuilder withId(Long id) {
32+
public ProductTestBuilder withId(final Long id) {
3333
this.id = id;
3434
return this;
3535
}
3636

37-
public ProductTestBuilder withName(String name) {
37+
public ProductTestBuilder withName(final String name) {
3838
this.name = name;
3939
return this;
4040
}
4141

42-
public ProductTestBuilder withDescription(String description) {
42+
public ProductTestBuilder withDescription(final String description) {
4343
this.description = description;
4444
return this;
4545
}
4646

47-
public ProductTestBuilder withPrice(BigDecimal price) {
47+
public ProductTestBuilder withPrice(final BigDecimal price) {
4848
this.price = price;
4949
return this;
5050
}
5151

52-
public ProductTestBuilder withRetired(boolean retired) {
52+
public ProductTestBuilder withRetired(final boolean retired) {
5353
this.retired = retired;
5454
return this;
5555
}
5656

57-
public ProductTestBuilder withCategories(Set<Category> categories) {
57+
public ProductTestBuilder withCategories(final Set<Category> categories) {
5858
this.categories = categories;
5959
return this;
6060
}
6161

62-
public ProductTestBuilder withLineItems(Set<LineItem> lineItems) {
62+
public ProductTestBuilder withLineItems(final Set<LineItem> lineItems) {
6363
this.lineItems = lineItems;
6464
return this;
6565
}

src/test/java/com/answerdigital/answerking/builder/UpdateCategoryRequestTestBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ public UpdateCategoryRequestTestBuilder withDefaultValues() {
1313
return this;
1414
}
1515

16-
public UpdateCategoryRequestTestBuilder withName(String name) {
16+
public UpdateCategoryRequestTestBuilder withName(final String name) {
1717
this.name = name;
1818
return this;
1919
}
2020

21-
public UpdateCategoryRequestTestBuilder withDescription(String description) {
21+
public UpdateCategoryRequestTestBuilder withDescription(final String description) {
2222
this.description = description;
2323
return this;
2424
}

0 commit comments

Comments
 (0)