You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test case below. The test fails at the second set of checks.
/*
* 12/14/2016
*
* TestDefaultCompletionProvider.java - test basic completion provider implementation.
*
* This library is distributed under a modified BSD license. See the included
* AutoComplete.License.txt file for details.
*/
package org.fife.ui.autocomplete;
import java.util.List;
import org.junit.Assert;
import org.junit.runners.MethodSorters;
import org.junit.FixMethodOrder;
import org.junit.Test;
/**
* Test cases for DefaultCompletionProvider
*
* @author Thomas Wang
*/
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestDefaultCompletionProvider extends DefaultCompletionProvider
{
@Test
public void testGetCompletionByInputText()
{
DefaultCompletionProvider provider = new DefaultCompletionProvider();
final Completion c1 = new BasicCompletion(provider, "BETA");
final Completion c2 = new BasicCompletion(provider, "beta");
final Completion c3 = new BasicCompletion(provider, "ALPHA");
final Completion c4 = new BasicCompletion(provider, "alpha");
final Completion c5 = new BasicCompletion(provider, "GAMMA");
final Completion c6 = new BasicCompletion(provider, "gamma");
provider.addCompletion(c1);
provider.addCompletion(c2);
List<Completion> betaList = provider.getCompletionByInputText("beta");
// Check for correct properties of returned list.
Assert.assertTrue(betaList.size() == 2);
for (Completion comp : betaList)
{
Assert.assertTrue("beta".equalsIgnoreCase(comp.getInputText()));
}
provider.addCompletion(c3);
provider.addCompletion(c4);
provider.addCompletion(c5);
provider.addCompletion(c6);
// Check for correct properties of returned list.
Assert.assertTrue(betaList.size() == 2);
for (Completion comp : betaList)
{
Assert.assertTrue("beta".equalsIgnoreCase(comp.getInputText()));
}
}
}
The text was updated successfully, but these errors were encountered:
Test case below. The test fails at the second set of checks.
The text was updated successfully, but these errors were encountered: