feat: polish native root tab memory
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package com.hyzq.boss;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class RootTabMemoryTest {
|
||||
@Test
|
||||
public void resolveInitialTab_prefersExplicitTab() {
|
||||
assertEquals("devices", RootTabMemory.resolveInitialTab("devices", "me", "conversations"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void resolveInitialTab_fallsBackToStoredTab() {
|
||||
assertEquals("me", RootTabMemory.resolveInitialTab(null, "me", "devices"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void resolveInitialTab_usesPreferredEntryBeforeDefault() {
|
||||
assertEquals("devices", RootTabMemory.resolveInitialTab(null, null, "devices"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void resolveInitialTab_defaultsToConversations() {
|
||||
assertEquals("conversations", RootTabMemory.resolveInitialTab(null, null, null));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user