Search in sources :

Example 1 with NavigationDrawerData

use of com.kickstarter.ui.adapters.data.NavigationDrawerData in project android-oss by kickstarter.

the class DiscoverDrawerUtilsTests method testDeriveNavigationDrawerData_LoggedOut_ArtExpanded.

@Test
public void testDeriveNavigationDrawerData_LoggedOut_ArtExpanded() {
    final NavigationDrawerData data = DiscoveryDrawerUtils.deriveNavigationDrawerData(categories, DiscoveryParams.builder().build(), CategoryFactory.artCategory(), null);
    assertEquals(5, data.sections().size());
    assertEquals(1, data.sections().get(0).rows().size());
    assertEquals(1, data.sections().get(1).rows().size());
    assertEquals(4, data.sections().get(2).rows().size());
    assertEquals(1, data.sections().get(3).rows().size());
    assertEquals(1, data.sections().get(4).rows().size());
}
Also used : NavigationDrawerData(com.kickstarter.ui.adapters.data.NavigationDrawerData) Test(org.junit.Test)

Example 2 with NavigationDrawerData

use of com.kickstarter.ui.adapters.data.NavigationDrawerData in project android-oss by kickstarter.

the class DiscoverDrawerUtilsTests method testDeriveNavigationDrawerData_LoggedIn_Social_DefaultSelected.

@Test
public void testDeriveNavigationDrawerData_LoggedIn_Social_DefaultSelected() {
    final NavigationDrawerData data = DiscoveryDrawerUtils.deriveNavigationDrawerData(categories, DiscoveryParams.builder().build(), null, UserFactory.socialUser());
    assertEquals(8, data.sections().size());
    assertEquals(1, data.sections().get(0).rows().size());
    assertEquals(1, data.sections().get(1).rows().size());
    assertEquals(1, data.sections().get(2).rows().size());
    assertEquals(1, data.sections().get(3).rows().size());
    assertEquals(1, data.sections().get(4).rows().size());
    assertEquals(1, data.sections().get(5).rows().size());
    assertEquals(1, data.sections().get(6).rows().size());
    assertEquals(1, data.sections().get(7).rows().size());
}
Also used : NavigationDrawerData(com.kickstarter.ui.adapters.data.NavigationDrawerData) Test(org.junit.Test)

Example 3 with NavigationDrawerData

use of com.kickstarter.ui.adapters.data.NavigationDrawerData in project android-oss by kickstarter.

the class DiscoverDrawerUtilsTests method testDeriveNavigationDrawerData_LoggedOut_DefaultSelected.

@Test
public void testDeriveNavigationDrawerData_LoggedOut_DefaultSelected() {
    final NavigationDrawerData data = DiscoveryDrawerUtils.deriveNavigationDrawerData(categories, DiscoveryParams.builder().build(), null, null);
    assertEquals(5, data.sections().size());
    assertEquals(1, data.sections().get(0).rows().size());
    assertEquals(1, data.sections().get(1).rows().size());
    assertEquals(1, data.sections().get(2).rows().size());
    assertEquals(1, data.sections().get(3).rows().size());
    assertEquals(1, data.sections().get(4).rows().size());
}
Also used : NavigationDrawerData(com.kickstarter.ui.adapters.data.NavigationDrawerData) Test(org.junit.Test)

Example 4 with NavigationDrawerData

use of com.kickstarter.ui.adapters.data.NavigationDrawerData in project android-oss by kickstarter.

the class DiscoverDrawerUtilsTests method testDeriveNavigationDrawerData_LoggedIn_DefaultSelected.

@Test
public void testDeriveNavigationDrawerData_LoggedIn_DefaultSelected() {
    final NavigationDrawerData data = DiscoveryDrawerUtils.deriveNavigationDrawerData(categories, DiscoveryParams.builder().build(), null, UserFactory.user());
    assertEquals(7, data.sections().size());
    assertEquals(1, data.sections().get(0).rows().size());
    assertEquals(1, data.sections().get(1).rows().size());
    assertEquals(1, data.sections().get(2).rows().size());
    assertEquals(1, data.sections().get(3).rows().size());
    assertEquals(1, data.sections().get(4).rows().size());
    assertEquals(1, data.sections().get(5).rows().size());
    assertEquals(1, data.sections().get(6).rows().size());
}
Also used : NavigationDrawerData(com.kickstarter.ui.adapters.data.NavigationDrawerData) Test(org.junit.Test)

Aggregations

NavigationDrawerData (com.kickstarter.ui.adapters.data.NavigationDrawerData)4 Test (org.junit.Test)4