mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
LibraryManagerUI: library types order fixed
This commit is contained in:
@ -0,0 +1,19 @@
|
||||
package cc.arduino.contributions.libraries;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class LibraryOfTypeComparatorTest {
|
||||
|
||||
@Test
|
||||
public void testSort() throws Exception {
|
||||
List<String> strings = Arrays.asList("Arduino", "Contributed", "Recommended", "Recommended", "Other", "1yetanother", "Arduino", "Recommended", "Contributed", "Recommended");
|
||||
Collections.sort(strings, new LibraryTypeComparator());
|
||||
assertEquals(Arrays.asList("Arduino", "Arduino", "Recommended", "Recommended", "Recommended", "Recommended", "Contributed", "Contributed", "1yetanother", "Other"), strings);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user