// Path: src/main/java/me/alb_i986/selenium/tinafw/tasks/WebTask.java
// public interface WebTask {
// 
// 	/**
// 	 * Perform this task as the user {@link #getUser()}.
// 	 * Precondition: the user must have already been set
// 	 * (see {@link #setUser(WebUser)}).
// 	 * 
// 	 * @param initialPage the page it is displayed before this task starts
// 	 * @return the last page that is displayed after this task finishes
// 	 */
// 	public WebPage run(WebPage initialPage);
// 	
// 	/**
// 	 * Builds an {@link OrWebTask} made up of (in order)
// 	 * this task and the given alternative task.
// 	 * This method can be "recursively" chained in order to define
// 	 * a multi-member OR, e.g.:
// 	 * <pre>
// 	 * {@code
// 	 * new MyTask()
// 	 *    .or(new AlternativeTask1())
// 	 *    .or(new AlternativeTask2())
// 	 *    .or(new AlternativeTask3())
// 	 * ;
// 	 * }
// 	 * </pre>
// 	 * 
// 	 * @param alternativeTask the task to run if this task fails
// 	 * @return an {@link OrWebTask} made up of (in order)
// 	 *         this task and the alternative
// 	 */
// 	default public OrWebTask or(WebTask alternativeTask) {
// 		return new OrWebTask(this, alternativeTask);
// 	}
// 	
// 	/**
// 	 * @param user the user this task will run as.
// 	 * @return this
// 	 */
// 	public WebTask setUser(WebUser user);
// 
// 	/**
// 	 * @return the user that this task runs as
// 	 */
// 	public WebUser getUser();
// 	
// }
// 
// Path: src/main/java/me/alb_i986/selenium/tinafw/ui/WebPage.java
// public interface WebPage {
// 
// 	/**
// 	 * @see Config#getBaseUrl()
// 	 */
// 	public final static String BASE_URL = Config.getBaseUrl();
// 	
// 
// 	/**
// 	 * @see WebDriver#getTitle()
// 	 */
// 	public String getTitle();
// 
// 	/**
// 	 * @see WebDriver#getCurrentUrl()
// 	 */
// 	public String getCurrentUrl();
// 
// }


import static org.junit.Assert.*;
import static org.mockito.BDDMockito.*;
import me.alb_i986.selenium.tinafw.tasks.WebTask;
import me.alb_i986.selenium.tinafw.ui.WebPage;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.openqa.selenium.WebDriver;

	/**
	 * Testing the state of {@code currentPage} after {@link WebUser#closeBrowser()}.
	 * <p>
	 * <ol>
	 * <li>Given a user with some initial page</li>
	 * <li>When {@link WebUser#closeBrowser()}</li>
	 * <li>Then {@link WebUser#getCurrentPage()} should be null</li>
	 * </ol>
	 */
	@Test
	public void whenCloseBrowserThenCurrentPageShouldBeNull() {
		user.setCurrentPage(stubPage);
		assertNotNull(user.getCurrentPage());

		// when
		user.closeBrowser();

		assertNull(user.getCurrentPage());
	}

	@Test
	public void equalsToNonUser() {
		Object o = new Object();
		assertFalse(user.equals(o));
	}

	/**
	 * Testing {@link WebUser#equals(Object)}.
	 */
// Path: src/main/java/me/alb_i986/selenium/tinafw/tasks/WebTask.java
// public interface WebTask {
// 
// 	/**
// 	 * Perform this task as the user {@link #getUser()}.
// 	 * Precondition: the user must have already been set
// 	 * (see {@link #setUser(WebUser)}).
// 	 * 
// 	 * @param initialPage the page it is displayed before this task starts
// 	 * @return the last page that is displayed after this task finishes
// 	 */
// 	public WebPage run(WebPage initialPage);
// 	
// 	/**
// 	 * Builds an {@link OrWebTask} made up of (in order)
// 	 * this task and the given alternative task.
// 	 * This method can be "recursively" chained in order to define
// 	 * a multi-member OR, e.g.:
// 	 * <pre>
// 	 * {@code
// 	 * new MyTask()
// 	 *    .or(new AlternativeTask1())
// 	 *    .or(new AlternativeTask2())
// 	 *    .or(new AlternativeTask3())
// 	 * ;
// 	 * }
// 	 * </pre>
// 	 * 
// 	 * @param alternativeTask the task to run if this task fails
// 	 * @return an {@link OrWebTask} made up of (in order)
// 	 *         this task and the alternative
// 	 */
// 	default public OrWebTask or(WebTask alternativeTask) {
// 		return new OrWebTask(this, alternativeTask);
// 	}
// 	
// 	/**
// 	 * @param user the user this task will run as.
// 	 * @return this
// 	 */
// 	public WebTask setUser(WebUser user);
// 
// 	/**
// 	 * @return the user that this task runs as
// 	 */
// 	public WebUser getUser();
// 	
// }
// 
// Path: src/main/java/me/alb_i986/selenium/tinafw/ui/WebPage.java
// public interface WebPage {
// 
// 	/**
// 	 * @see Config#getBaseUrl()
// 	 */
// 	public final static String BASE_URL = Config.getBaseUrl();
// 	
// 
// 	/**
// 	 * @see WebDriver#getTitle()
// 	 */
// 	public String getTitle();
// 
// 	/**
// 	 * @see WebDriver#getCurrentUrl()
// 	 */
// 	public String getCurrentUrl();
// 
// }


// Path: src/test/java/me/alb_i986/selenium/tinafw/domain/WebUserTest.java
import static org.junit.Assert.*;
import static org.mockito.BDDMockito.*;
import me.alb_i986.selenium.tinafw.tasks.WebTask;
import me.alb_i986.selenium.tinafw.ui.WebPage;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.openqa.selenium.WebDriver;


	/**
	 * Testing the state of {@code currentPage} after {@link WebUser#closeBrowser()}.
	 * <p>
	 * <ol>
	 * <li>Given a user with some initial page</li>
	 * <li>When {@link WebUser#closeBrowser()}</li>
	 * <li>Then {@link WebUser#getCurrentPage()} should be null</li>
	 * </ol>
	 */
	@Test
	public void whenCloseBrowserThenCurrentPageShouldBeNull() {
		user.setCurrentPage(stubPage);
		assertNotNull(user.getCurrentPage());

		// when
		user.closeBrowser();

		assertNull(user.getCurrentPage());
	}

	@Test
	public void equalsToNonUser() {
		Object o = new Object();
		assertFalse(user.equals(o));
	}

	/**
	 * Testing {@link WebUser#equals(Object)}.
	 */
	@Test