BAEL-2535

Remove CustomerReflectionToStringUnitTest
This commit is contained in:
Emily Cheyne 2019-01-10 15:05:00 -07:00 committed by GitHub
parent b8dbc9d053
commit c65180c74f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 32 deletions

View File

@ -1,32 +0,0 @@
package com.baeldung.string.tostring;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.ArrayList;
import java.util.List;
import org.junit.jupiter.api.Test;
public class CustomerReflectionToStringUnitTest {
private static final String CUSTOMER_REFLECTION_TO_STRING = "com.baeldung.string.tostring.CustomerReflectionToString";
@Test
public void givenWrapperCollectionStrBuffer_whenReflectionToString_thenCustomerDetails() {
CustomerReflectionToString customer = new CustomerReflectionToString();
customer.setFirstName("Rajesh");
customer.setLastName("Bhojwani");
customer.setScore(8);
List<String> orders = new ArrayList<String>();
orders.add("Book");
orders.add("Pen");
customer.setOrders(orders);
StringBuffer fullname = new StringBuffer();
fullname.append(customer.getLastName()+", "+ customer.getFirstName());
customer.setFullname(fullname);
assertTrue(customer.toString().contains(CUSTOMER_REFLECTION_TO_STRING));
}
}