@@ -0,0 +1,1741 @@
+/*%0A * Copyright (c) 2012 Mateusz Parzonka, Eric Bodden%0A * All rights reserved. This program and the accompanying materials%0A * are made available under the terms of the Eclipse Public License v1.0%0A * which accompanies this distribution, and is available at%0A * http://www.eclipse.org/legal/epl-v10.html%0A *%0A * Contributors:%0A * Mateusz Parzonka - initial API and implementation%0A */%0Apackage rm4j.api;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport java.util.Collection;%0Aimport java.util.HashSet;%0Aimport java.util.Iterator;%0Aimport java.util.Set;%0A%0Aimport org.junit.Test;%0A%0Apublic class AlphabetTest %7B%0A%0A    @Test%0A    @SuppressWarnings(%22rawtypes%22)%0A    public void getIndex_getParameterCount_getParameters() throws Exception %7B%0A%09final Alphabet alphabet = new Alphabet();%0A%0A%09final Parameter%3CCollection%3E c = alphabet.createParameter(Collection.class);%0A%09final Parameter%3CIterator%3E i = alphabet.createParameter(Iterator.class);%0A%09final Symbol1%3CCollection%3E updateColl = alphabet.createSymbol1(c);%0A%09final Symbol2%3CCollection, Iterator%3E createIter = alphabet.createSymbol2(c, i);%0A%09final Symbol1%3CIterator%3E updateIter = alphabet.createSymbol1(i);%0A%0A%09assertEquals(0, updateColl.getIndex());%0A%09assertEquals(1, updateColl.getParameterCount());%0A%09assertEquals(asSet(c), updateColl.getParameters());%0A%0A%09assertEquals(1, createIter.getIndex());%0A%09assertEquals(2, createIter.getParameterCount());%0A%09assertEquals(asSet(c, i), createIter.getParameters());%0A%0A%09assertEquals(2, updateIter.getIndex());%0A%09assertEquals(1, updateIter.getParameterCount());%0A%09assertEquals(asSet(i), updateIter.getParameters());%0A    %7D%0A%0A    private static Set%3C?%3E asSet(Object... obj) %7B%0A%09Set%3CObject%3E set = new HashSet%3CObject%3E();%0A%09for (Object object : obj) %7B%0A%09    set.add(object);%0A%09%7D%0A%09return set;%0A    %7D%0A%0A%7D%0A

Add test