Search in sources :

Example 16 with Category

use of com.kickstarter.models.Category in project android-oss by kickstarter.

the class DiscoveryParamsTest method testShouldIncludeFeatured.

@Test
public void testShouldIncludeFeatured() {
    final Category nonRootCategory = CategoryFactory.bluesCategory();
    final DiscoveryParams nonRootParams = DiscoveryParams.builder().category(nonRootCategory).build();
    assertEquals(false, nonRootParams.shouldIncludeFeatured());
    final Category rootCategory = CategoryFactory.gamesCategory();
    final DiscoveryParams rootParams = DiscoveryParams.builder().category(rootCategory).build();
    assertEquals(true, rootParams.shouldIncludeFeatured());
}
Also used : Category(com.kickstarter.models.Category) Test(org.junit.Test)

Aggregations

Category (com.kickstarter.models.Category)16 Test (org.junit.Test)9 Project (com.kickstarter.models.Project)6 DiscoveryParams (com.kickstarter.services.DiscoveryParams)5 User (com.kickstarter.models.User)4 Observable (rx.Observable)4 Context (android.content.Context)3 Intent (android.content.Intent)3 NonNull (android.support.annotation.NonNull)3 NonNull (androidx.annotation.NonNull)3 KSRobolectricTestCase (com.kickstarter.KSRobolectricTestCase)3 R (com.kickstarter.R)3 Environment (com.kickstarter.libs.Environment)3 MockCurrentUser (com.kickstarter.libs.MockCurrentUser)3 EventName (com.kickstarter.libs.utils.EventName)3 CategoryFactory (com.kickstarter.mock.factories.CategoryFactory)3 UserFactory (com.kickstarter.mock.factories.UserFactory)3 MockApiClient (com.kickstarter.mock.services.MockApiClient)3 Photo (com.kickstarter.models.Photo)3 Arrays (java.util.Arrays)3