Fixed outdated tests
This commit is contained in:
parent
7020e60aed
commit
96d344fabd
@ -288,7 +288,7 @@ public class CustomerControllerTest extends AbstractControllerTest {
|
|||||||
for (int i=0;i<143;i++) {
|
for (int i=0;i<143;i++) {
|
||||||
Customer customer = new Customer();
|
Customer customer = new Customer();
|
||||||
customer.setTenantId(tenantId);
|
customer.setTenantId(tenantId);
|
||||||
String suffix = RandomStringUtils.randomAlphanumeric((int)(Math.random()*15));
|
String suffix = RandomStringUtils.randomAlphanumeric((int)(5 + Math.random()*10));
|
||||||
String title = title1+suffix;
|
String title = title1+suffix;
|
||||||
title = i % 2 == 0 ? title.toLowerCase() : title.toUpperCase();
|
title = i % 2 == 0 ? title.toLowerCase() : title.toUpperCase();
|
||||||
customer.setTitle(title);
|
customer.setTitle(title);
|
||||||
@ -299,7 +299,7 @@ public class CustomerControllerTest extends AbstractControllerTest {
|
|||||||
for (int i=0;i<175;i++) {
|
for (int i=0;i<175;i++) {
|
||||||
Customer customer = new Customer();
|
Customer customer = new Customer();
|
||||||
customer.setTenantId(tenantId);
|
customer.setTenantId(tenantId);
|
||||||
String suffix = RandomStringUtils.randomAlphanumeric((int)(Math.random()*15));
|
String suffix = RandomStringUtils.randomAlphanumeric((int)(5 + Math.random()*10));
|
||||||
String title = title2+suffix;
|
String title = title2+suffix;
|
||||||
title = i % 2 == 0 ? title.toLowerCase() : title.toUpperCase();
|
title = i % 2 == 0 ? title.toLowerCase() : title.toUpperCase();
|
||||||
customer.setTitle(title);
|
customer.setTitle(title);
|
||||||
|
|||||||
@ -149,7 +149,7 @@ public class TenantControllerTest extends AbstractControllerTest {
|
|||||||
List<Tenant> tenantsTitle1 = new ArrayList<>();
|
List<Tenant> tenantsTitle1 = new ArrayList<>();
|
||||||
for (int i=0;i<134;i++) {
|
for (int i=0;i<134;i++) {
|
||||||
Tenant tenant = new Tenant();
|
Tenant tenant = new Tenant();
|
||||||
String suffix = RandomStringUtils.randomAlphanumeric((int)(Math.random()*15));
|
String suffix = RandomStringUtils.randomAlphanumeric((int)(5 + Math.random()*10));
|
||||||
String title = title1+suffix;
|
String title = title1+suffix;
|
||||||
title = i % 2 == 0 ? title.toLowerCase() : title.toUpperCase();
|
title = i % 2 == 0 ? title.toLowerCase() : title.toUpperCase();
|
||||||
tenant.setTitle(title);
|
tenant.setTitle(title);
|
||||||
@ -159,7 +159,7 @@ public class TenantControllerTest extends AbstractControllerTest {
|
|||||||
List<Tenant> tenantsTitle2 = new ArrayList<>();
|
List<Tenant> tenantsTitle2 = new ArrayList<>();
|
||||||
for (int i=0;i<127;i++) {
|
for (int i=0;i<127;i++) {
|
||||||
Tenant tenant = new Tenant();
|
Tenant tenant = new Tenant();
|
||||||
String suffix = RandomStringUtils.randomAlphanumeric((int)(Math.random()*15));
|
String suffix = RandomStringUtils.randomAlphanumeric((int)(5 + Math.random()*10));
|
||||||
String title = title2+suffix;
|
String title = title2+suffix;
|
||||||
title = i % 2 == 0 ? title.toLowerCase() : title.toUpperCase();
|
title = i % 2 == 0 ? title.toLowerCase() : title.toUpperCase();
|
||||||
tenant.setTitle(title);
|
tenant.setTitle(title);
|
||||||
|
|||||||
@ -139,10 +139,10 @@ public class CustomerServiceImplTest extends AbstractServiceTest {
|
|||||||
TenantId tenantId = tenant.getId();
|
TenantId tenantId = tenant.getId();
|
||||||
|
|
||||||
List<Customer> customers = new ArrayList<>();
|
List<Customer> customers = new ArrayList<>();
|
||||||
for (int i=0;i<135;i++) {
|
for (int i = 0; i < 135; i++) {
|
||||||
Customer customer = new Customer();
|
Customer customer = new Customer();
|
||||||
customer.setTenantId(tenantId);
|
customer.setTenantId(tenantId);
|
||||||
customer.setTitle("Customer"+i);
|
customer.setTitle("Customer" + i);
|
||||||
customers.add(customerService.saveCustomer(customer));
|
customers.add(customerService.saveCustomer(customer));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,22 +176,22 @@ public class CustomerServiceImplTest extends AbstractServiceTest {
|
|||||||
public void testFindCustomersByTenantIdAndTitle() {
|
public void testFindCustomersByTenantIdAndTitle() {
|
||||||
String title1 = "Customer title 1";
|
String title1 = "Customer title 1";
|
||||||
List<Customer> customersTitle1 = new ArrayList<>();
|
List<Customer> customersTitle1 = new ArrayList<>();
|
||||||
for (int i=0;i<143;i++) {
|
for (int i = 0; i < 143; i++) {
|
||||||
Customer customer = new Customer();
|
Customer customer = new Customer();
|
||||||
customer.setTenantId(tenantId);
|
customer.setTenantId(tenantId);
|
||||||
String suffix = RandomStringUtils.randomAlphanumeric((int)(Math.random()*15));
|
String suffix = RandomStringUtils.randomAlphanumeric((int)(5 + Math.random()*10));
|
||||||
String title = title1+suffix;
|
String title = title1 + suffix;
|
||||||
title = i % 2 == 0 ? title.toLowerCase() : title.toUpperCase();
|
title = i % 2 == 0 ? title.toLowerCase() : title.toUpperCase();
|
||||||
customer.setTitle(title);
|
customer.setTitle(title);
|
||||||
customersTitle1.add(customerService.saveCustomer(customer));
|
customersTitle1.add(customerService.saveCustomer(customer));
|
||||||
}
|
}
|
||||||
String title2 = "Customer title 2";
|
String title2 = "Customer title 2";
|
||||||
List<Customer> customersTitle2 = new ArrayList<>();
|
List<Customer> customersTitle2 = new ArrayList<>();
|
||||||
for (int i=0;i<175;i++) {
|
for (int i = 0; i < 175; i++) {
|
||||||
Customer customer = new Customer();
|
Customer customer = new Customer();
|
||||||
customer.setTenantId(tenantId);
|
customer.setTenantId(tenantId);
|
||||||
String suffix = RandomStringUtils.randomAlphanumeric((int)(Math.random()*15));
|
String suffix = RandomStringUtils.randomAlphanumeric((int)(5 + Math.random()*10));
|
||||||
String title = title2+suffix;
|
String title = title2 + suffix;
|
||||||
title = i % 2 == 0 ? title.toLowerCase() : title.toUpperCase();
|
title = i % 2 == 0 ? title.toLowerCase() : title.toUpperCase();
|
||||||
customer.setTitle(title);
|
customer.setTitle(title);
|
||||||
customersTitle2.add(customerService.saveCustomer(customer));
|
customersTitle2.add(customerService.saveCustomer(customer));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user