@@ -0,0 +1,2625 @@
+package alma.alarmsystem.clients.test;%0A/*%0A * ALMA - Atacama Large Millimiter Array (c) European Southern Observatory, 2007%0A * %0A * This library is free software; you can redistribute it and/or modify it under%0A * the terms of the GNU Lesser General Public License as published by the Free%0A * Software Foundation; either version 2.1 of the License, or (at your option)%0A * any later version.%0A * %0A * This library is distributed in the hope that it will be useful, but WITHOUT%0A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS%0A * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more%0A * details.%0A * %0A * You should have received a copy of the GNU Lesser General Public License%0A * along with this library; if not, write to the Free Software Foundation, Inc.,%0A * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA%0A * %0A */%0Aimport cern.laser.client.data.Alarm;%0Aimport cern.laser.client.services.selection.AlarmSelectionListener;%0Aimport cern.laser.client.services.selection.LaserSelectionException;%0Aimport alma.acs.component.client.ComponentClientTestCase;%0Aimport alma.alarmsystem.clients.CategoryClient;%0A%0A/**%0A * Test the getThreshold method of the Category client.%0A * %0A * Each method of the Category client needs to be tested in a separate class due to a bug in the NC %0A * (COMP-2153)%0A * %0A * @author acaproni%0A *%0A */%0Apublic class CategoryClientThreshold extends ComponentClientTestCase implements AlarmSelectionListener %7B%0A%09%0A%09/**%0A%09 *  The categoryClient to test%0A%09 */%0A%09private CategoryClient categoryClient;%0A%0A%09/**%0A%09 * Constructor%0A%09 */%0A%09public CategoryClientThreshold() throws Exception %7B%0A%09%09super(CategoryClientThreshold.class.getName());%0A%09%7D%0A%09%0A%09/**%0A%09 * @see extends ComponentClientTestCase%0A%09 */%0A%09public void setUp() throws Exception %7B%0A%09%09super.setUp();%0A%09%09%0A%09%09categoryClient = new CategoryClient(getContainerServices());%0A%09%09assertNotNull(categoryClient);%0A%09%7D%0A%09%0A%09/**%0A%09 * @see extends ComponentClientTestCase%0A%09 */%0A%09public void teraDown() throws Exception %7B%0A%09%09categoryClient.close();%0A%09%09super.tearDown();%0A%09%7D%0A%09%0A%09public void testGetThreashold() throws Exception %7B%0A%09%09categoryClient.connect(this);%0A%09%09int threshold = categoryClient.getMultiplicityThreshold(%22TEST:MCAUSE:1%22);%0A%09%09assertEquals(3, threshold);%0A%09%7D%0A%0A%09/**%0A%09 * @see cern.laser.client.services.selection.AlarmSelectionListener#onAlarm(cern.laser.client.data.Alarm)%0A%09 */%0A%09@Override%0A%09public void onAlarm(Alarm alarm) %7B%09%7D%0A%0A%09/**%0A%09 * @see cern.laser.client.services.selection.AlarmSelectionListener#onException(cern.laser.client.services.selection.LaserSelectionException)%0A%09 */%0A%09@Override%0A%09public void onException(LaserSelectionException e) %7B%7D%0A%7D%0A

Test getThreshold of the CategoryClient