/*
 * ***********************************************************************
 *
 *  ADOBE CONFIDENTIAL
 *  ___________________
 *
 *  Copyright 2013 Adobe Systems Incorporated
 *  All Rights Reserved.
 *
 *  NOTICE:  All information contained herein is, and remains
 *  the property of Adobe Systems Incorporated and its suppliers,
 *  if any.  The intellectual and technical concepts contained
 *  herein are proprietary to Adobe Systems Incorporated and its
 *  suppliers and are protected by trade secret or copyright law.
 *  Dissemination of this information or reproduction of this material
 *  is strictly forbidden unless prior written permission is obtained
 *  from Adobe Systems Incorporated.
 *
 * ***********************************************************************
 */

package com.adobe.primetime.reference.feature.drm;

import java.util.regex.Pattern;

import com.adobe.primetime.reference.R;

/**
 * Load a media URL with a DRM policy that is set for a date in future. Check
 * that the expected Dialog with error message appears.
 * 
 */
public class DRMInvalidPolicyEndToEndTest extends DRMEndToEndTestBase {

	public DRMInvalidPolicyEndToEndTest() {
		contentUrl = "http://primetime.corp.adobe.com/DRM/ProdPKI/policy_time_related_tests/Policy_Start_date_in_future/primetime/hls/drm/small.m3u8";
	}

	public void testDialogShowsForDRMError() throws InterruptedException {

		String expectedMessage = this.getInstrumentation().getTargetContext()
				.getResources().getString(R.string.drm_message_3331);
		assertTrue(solo.waitForText(Pattern.quote(expectedMessage), 1, 20000));
	}
}
