@@ -0,0 +1,3222 @@
+/*%0A * Copyright (c) 2005-2009 Grameen Foundation USA%0A * All rights reserved.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or%0A * implied. See the License for the specific language governing%0A * permissions and limitations under the License.%0A *%0A * See also http://www.apache.org/licenses/LICENSE-2.0.html for an%0A * explanation of the license and how it is applied.%0A */%0Apackage org.mifos.test.acceptance.search;%0A%0Aimport org.mifos.test.acceptance.framework.AppLauncher;%0Aimport org.mifos.test.acceptance.framework.DbUnitUtilities;%0Aimport org.mifos.test.acceptance.framework.MifosPage;%0Aimport org.mifos.test.acceptance.framework.search.SearchResultsPage;%0Aimport org.mifos.test.acceptance.remote.InitializeApplicationRemoteTestingService;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.jdbc.datasource.DriverManagerDataSource;%0Aimport org.springframework.test.context.ContextConfiguration;%0Aimport org.testng.Assert;%0Aimport org.testng.annotations.AfterMethod;%0Aimport org.testng.annotations.BeforeMethod;%0Aimport org.testng.annotations.Test;%0A%0A@ContextConfiguration(locations = %7B %22classpath:ui-test-context.xml%22 %7D)%0A@Test(sequential = true, groups = %7B%22acceptance%22,%22ui%22%7D)%0Apublic class SearchCenterTest extends SearchTestBase %7B%0A    private AppLauncher appLauncher;%0A%0A    @Autowired%0A    private DriverManagerDataSource dataSource;%0A    @Autowired%0A    private DbUnitUtilities dbUnitUtilities;%0A    @Autowired%0A    private InitializeApplicationRemoteTestingService initRemote;%0A    %0A    %0A    private static String dataFileName = %22acceptance_small_003_dbunit.xml.zip%22;%0A    %0A    @SuppressWarnings(%22PMD.SignatureDeclareThrowsException%22)%0A    // one of the dependent methods throws Exception%0A    @BeforeMethod%0A    public void setUp() throws Exception %7B%0A        super.setUp();%0A        appLauncher = new AppLauncher(selenium);%0A    %7D%0A%0A    @AfterMethod%0A    public void tearDown() %7B%0A        (new MifosPage(selenium)).logout();%0A    %7D%0A    %0A    @SuppressWarnings(%22PMD.SignatureDeclareThrowsException%22)%0A    public void searchCentersTest() throws Exception %7B%0A        initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, %0A                dataFileName,%0A                dataSource, selenium);    %0A        %0A        SearchResultsPage page = searchFor( appLauncher, %22MyCenter%22); %0A        int count = page.countSearchResults();%0A        Assert.assertEquals( count, 5 );%0A    %7D%0A    %0A    @SuppressWarnings(%22PMD.SignatureDeclareThrowsException%22)%0A    public void searchCenterSpecificTest()  throws Exception %7B%0A        initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, %0A                dataFileName,%0A                dataSource, selenium);    %0A        %0A        SearchResultsPage page = searchFor( appLauncher, %22MyCenter1232993841778%22);%0A        int count = page.countSearchResults();%0A        Assert.assertEquals( count, 1 );%0A    %7D    %0A%7D%0A

Add new test for searching Centers. Patch provided by Goldman Sachs as issue tracker task 2419. Only adding new class - SearchCenterTest - since patch for task 2420 already provided other helper methods. Also included license and removed argument to countSearchResults.