/*******************************************************************************
* Copyright (c) 2013 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.aerogear.ui.bot.test.app;
import static org.junit.Assert.assertTrue;
import org.jboss.reddeer.eclipse.jdt.ui.ProjectExplorer;
import org.jboss.reddeer.requirements.cleanworkspace.CleanWorkspaceRequirement.CleanWorkspace;
import org.jboss.tools.aerogear.reddeer.cordovasim.CordovaSimLauncher;
import org.jboss.tools.aerogear.ui.bot.test.AerogearBotTest;
import org.junit.Before;
import org.junit.Test;
@CleanWorkspace
public class RunWithCordovaSim extends AerogearBotTest {
@Before
public void setUp() {
createHTMLHybridMobileApplication(AerogearBotTest.CORDOVA_PROJECT_NAME, AerogearBotTest.CORDOVA_APP_NAME,
"org.jboss.example.cordova");
assertTrue(new ProjectExplorer().containsProject(AerogearBotTest.CORDOVA_PROJECT_NAME));
}
@Test
public void canRunWithCordovaSim() {
runCordovaSim(CORDOVA_PROJECT_NAME);
CordovaSimLauncher.stopCordovasim();
}
}