package de.egga.dtos;

import org.testng.annotations.Test;

import static java.util.UUID.randomUUID;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;

/**
 * @author egga
 */
public class CustomerTest {

    @Test
    public void shouldAddGetterMethods() {
        Customer customer = new Customer();

        customer.getId();
        customer.getName();
        customer.getEmail();
    }

    @Test
    public void shouldAddSetterMethods() {
        Customer customer = new Customer();

        customer.setId(randomUUID());
        customer.setName("some name");
        customer.setEmail("e@mail.com");
    }

    @Test
    public void shouldImplementToString() {
        Customer customer = new Customer();

        assertThat(customer.toString(), is(equalTo("Customer(id=null, name=null, email=null)")));
    }

    @Test
    public void shouldAddBuilder() {
        Customer customer = Customer.builder()
                .id(randomUUID())
                .name("Darth Vader")
                .email("vader@empire.gov")
                .build();
    }
}

@@ -640,17 +640,24 @@
 me(%22
-some name
+Raj Koothrappali
 %22);%0A
@@ -687,18 +687,22 @@
 il(%22
-e@mail.com
+raj@bigbang.tv
 %22);%0A
@@ -799,32 +799,32 @@
 ew Customer();%0A%0A
-
         assertTh
@@ -904,32 +904,265 @@
 ll)%22)));%0A    %7D%0A%0A
+    @Test%0A    public void shouldAddEquals() %7B%0A        Customer one = Customer.builder().name(%22Elmo%22).build();%0A        Customer another = Customer.builder().name(%22Elmo%22).build();%0A%0A        assertThat(one, is(equalTo(another)));%0A    %7D%0A%0A
     @Test%0A    pu

add equals test