inner interface examples added (#3151)

This commit is contained in:
bahti
2017-12-11 20:31:52 +03:00
committed by Grzegorz Piwowarek
parent 9046955197
commit b2ea831d83
3 changed files with 58 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package com.baeldung.interfaces;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@RunWith(JUnit4.class)
public class InnerInterfaceTests {
@Test
public void whenCustomerListJoined_thenReturnsJoinedNames() {
Customer.List customerList = new CommaSeparatedCustomers();
customerList.Add(new Customer("customer1"));
customerList.Add(new Customer("customer2"));
assertEquals("customer1,customer2", customerList.getCustomerNames());
}
}