@@ -0,0 +1,1729 @@
+/*%0A * Copyright %C2%A9 2015 by Frank W. Rahn. Alle Rechte vorbehalten. All rights reserved.%0A */%0Apackage de.rahn.finances.domains.entities;%0A%0Aimport static de.rahn.finances.domains.entities.SecurityType.getKeyValueEntries;%0Aimport static de.rahn.finances.domains.entities.SecurityType.other;%0Aimport static de.rahn.finances.domains.entities.SecurityType.searchType;%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.hamcrest.Matchers.notNullValue;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.junit.Assert.fail;%0A%0Aimport java.util.Map.Entry;%0A%0Aimport org.junit.Test;%0A%0A/**%0A * Teste die Enumeration %7B@link SecurityType%7D.%0A * @author Frank W. Rahn%0A */%0Apublic class SecurityTypeTest %7B%0A%0A%09/**%0A%09 * Test method for %7B@link SecurityType#searchType(String)%7D.%0A%09 */%0A%09@Test(expected = NullPointerException.class)%0A%09public void testSearchType_01() %7B%0A%09%09searchType(null);%0A%09%09fail(%22Hier sollte eine Ausnahme geworfen werden%22);%0A%09%7D%0A%0A%09/**%0A%09 * Test method for %7B@link SecurityType#searchType(String)%7D.%0A%09 */%0A%09@Test(expected = IllegalArgumentException.class)%0A%09public void testSearchType_02() %7B%0A%09%09searchType(%22abcdef-4711%22);%0A%09%09fail(%22Hier sollte eine Ausnahme geworfen werden%22);%0A%09%7D%0A%0A%09/**%0A%09 * Test method for %7B@link SecurityType#searchType(String)%7D.%0A%09 */%0A%09@Test%0A%09public void testSearchType_03() %7B%0A%09%09SecurityType type = searchType(%22Sonstiges%22);%0A%0A%09%09assertThat(type, notNullValue());%0A%09%09assertThat(type, is(other));%0A%09%7D%0A%0A%09/**%0A%09 * Test method for %7B@link SecurityType#getKeyValueEntries()%7D.%0A%09 */%0A%09@Test%0A%09public void testGetKeyValueEntries() %7B%0A%09%09Entry%3CString, String%3E entry = getKeyValueEntries().stream().findFirst().get();%0A%0A%09%09assertThat(entry, notNullValue());%0A%09%09assertThat(entry.getKey(), is(%22stock%22));%0A%09%09assertThat(entry.getValue(), is(%22Aktie%22));%0A%09%7D%0A%0A%7D

Test für SecurityType erstellt