void function ( ) { mMockContext = mock ( Context . class ) ; mMockPackageManager = mock ( PackageManager . class ) ; when ( mMockContext . getPackageManager ( ) ) . thenReturn ( mMockPackageManager ) ; }
setup / teardown concode_field_sep Context mMockContext concode_elem_sep String EXPECTED_STANDARD_DISCOUNT_URL_STRING concode_elem_sep String TEST_DISCOUNT_CODE concode_elem_sep String TEST_API_KEY concode_elem_sep PackageManager mMockPackageManager concode_elem_sep String EXPECTED_NO_DISCOUNT_URL_STRING concode_elem_sep String TEST_STANDARD_USER_ID concode_field_sep void setMockCanOpenPlayStore concode_elem_sep void callingPlayStoreOpenWouldUseTheMarketURLIfTheMarketURLSchemeExists concode_elem_sep void setMockCanOpenParche concode_elem_sep void ifApplicationCanBeOpenedWeDontNeedToInstallOrUpgrade concode_elem_sep void ifApplicationCannotBeOpenedWeShouldInstallOrUpgrade concode_elem_sep void openingWithDiscountShouldFailIfAppNeedsInstallOrUpgrade concode_elem_sep void openingWithoutDiscountShouldWork concode_elem_sep void callingPlayStoreOpenWouldUseTheWebURLIfTheMarketURLSchemeDoesNotExist concode_elem_sep void openingWithoutDiscountShouldFailIfAppNeedsInstallOrUpgrade concode_elem_sep void openingWithDiscountShouldWork