Package com.arcbees.gwtpwebsite.server.order

Source Code of com.arcbees.gwtpwebsite.server.order.ConfirmationNumberGeneratorImplTest

package com.arcbees.gwtpwebsite.server.order;

import org.junit.Test;

import com.stripe.model.Customer;

import static org.junit.Assert.assertEquals;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;

public class ConfirmationNumberGeneratorImplTest {
    private static final String SOME_ID = "some id";

    private final ConfirmationNumberGeneratorImpl generator = new ConfirmationNumberGeneratorImpl();

    @Test
    public void generateConfirmationNumber_anyCustomer_willReturnCustomerId() {
        //given
        Customer customer = mock(Customer.class);
        given(customer.getId()).willReturn(SOME_ID);

        //when
        String confirmationNumber = generator.generateConfirmationNumber(customer);

        //then
        assertEquals(SOME_ID, confirmationNumber);
    }
}
TOP

Related Classes of com.arcbees.gwtpwebsite.server.order.ConfirmationNumberGeneratorImplTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.