Java 11 migrate remaining p (#1122)
* Moves partial-response to Java 11 * Moves pipeline to Java 11 * Moves poison-pill to Java 11 * Moves priority-queue to Java 11 * Moves private-class-data to Java 11 * Moves producer-consumer to Java 11 * Moves promise to Java 11 * Moves property to Java 11 * Moves prototype to Java 11 * Moves proxy to Java 11 * Corrects checkstyle errors * Fixes build for pipeline pattern
This commit is contained in:
		
				
					committed by
					
						 Ilkka Seppälä
						Ilkka Seppälä
					
				
			
			
				
	
			
			
			
						parent
						
							1401accb4f
						
					
				
				
					commit
					428efc7d53
				
			| @@ -26,6 +26,23 @@ | ||||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||||
|          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||||
|     <modelVersion>4.0.0</modelVersion> | ||||
|     <properties> | ||||
|         <maven.compiler.source>11</maven.compiler.source> | ||||
|         <maven.compiler.target>11</maven.compiler.target> | ||||
|     </properties> | ||||
|     <dependencies> | ||||
|         <dependency> | ||||
|             <groupId>net.sourceforge.htmlunit</groupId> | ||||
|             <artifactId>htmlunit</artifactId> | ||||
|             <scope>test</scope> | ||||
|         </dependency> | ||||
|         <dependency> | ||||
|             <groupId>org.junit.jupiter</groupId> | ||||
|             <artifactId>junit-jupiter</artifactId> | ||||
|             <version>RELEASE</version> | ||||
|             <scope>test</scope> | ||||
|         </dependency> | ||||
|     </dependencies> | ||||
|     <parent> | ||||
|         <groupId>com.iluwatar</groupId> | ||||
|         <artifactId>java-design-patterns</artifactId> | ||||
|   | ||||
| @@ -71,8 +71,8 @@ public final class App { | ||||
|   public static void main(String[] args) { | ||||
|  | ||||
|     try { | ||||
|       File applicationFile = | ||||
|           new File(App.class.getClassLoader().getResource("sample-ui/login.html").getPath()); | ||||
|       var classLoader = App.class.getClassLoader(); | ||||
|       var applicationFile = new File(classLoader.getResource("sample-ui/login.html").getPath()); | ||||
|  | ||||
|       // should work for unix like OS (mac, unix etc...) | ||||
|       if (Desktop.isDesktopSupported()) { | ||||
|   | ||||
| @@ -67,8 +67,8 @@ public final class App { | ||||
|   public static void main(String[] args) { | ||||
|  | ||||
|     try { | ||||
|       File applicationFile = | ||||
|           new File(App.class.getClassLoader().getResource("sample-ui/login.html").getPath()); | ||||
|       var classLoader = App.class.getClassLoader(); | ||||
|       var applicationFile = new File(classLoader.getResource("sample-ui/login.html").getPath()); | ||||
|  | ||||
|       // Should work for unix like OS (mac, unix etc...) | ||||
|       if (Desktop.isDesktopSupported()) { | ||||
|   | ||||
| @@ -23,14 +23,14 @@ | ||||
|  | ||||
| package com.iluwatar.pageobject; | ||||
|  | ||||
| import static org.junit.jupiter.api.Assertions.assertTrue; | ||||
|  | ||||
| import com.gargoylesoftware.htmlunit.WebClient; | ||||
| import com.iluwatar.pageobject.pages.AlbumListPage; | ||||
| import com.iluwatar.pageobject.pages.AlbumPage; | ||||
| import org.junit.jupiter.api.BeforeEach; | ||||
| import org.junit.jupiter.api.Test; | ||||
|  | ||||
| import static org.junit.jupiter.api.Assertions.assertTrue; | ||||
|  | ||||
| /** | ||||
|  * Test Album Selection and Album Listing | ||||
|  */ | ||||
| @@ -45,7 +45,7 @@ public class AlbumListPageTest { | ||||
|  | ||||
|   @Test | ||||
|   public void testSelectAlbum() { | ||||
|     AlbumPage albumPage = albumListPage.selectAlbum("21"); | ||||
|     var albumPage = albumListPage.selectAlbum("21"); | ||||
|     albumPage.navigateToPage(); | ||||
|     assertTrue(albumPage.isAt()); | ||||
|   } | ||||
|   | ||||
| @@ -23,14 +23,14 @@ | ||||
|  | ||||
| package com.iluwatar.pageobject; | ||||
|  | ||||
| import static org.junit.jupiter.api.Assertions.assertTrue; | ||||
|  | ||||
| import com.gargoylesoftware.htmlunit.WebClient; | ||||
| import com.iluwatar.pageobject.pages.AlbumListPage; | ||||
| import com.iluwatar.pageobject.pages.AlbumPage; | ||||
| import org.junit.jupiter.api.BeforeEach; | ||||
| import org.junit.jupiter.api.Test; | ||||
|  | ||||
| import static org.junit.jupiter.api.Assertions.assertTrue; | ||||
|  | ||||
| /** | ||||
|  * Test Album Page Operations | ||||
|  */ | ||||
| @@ -46,7 +46,7 @@ public class AlbumPageTest { | ||||
|   @Test | ||||
|   public void testSaveAlbum() { | ||||
|  | ||||
|     AlbumPage albumPageAfterChanges = albumPage | ||||
|     var albumPageAfterChanges = albumPage | ||||
|         .changeAlbumTitle("25") | ||||
|         .changeArtist("Adele Laurie Blue Adkins") | ||||
|         .changeAlbumYear(2015) | ||||
| @@ -60,7 +60,7 @@ public class AlbumPageTest { | ||||
|  | ||||
|   @Test | ||||
|   public void testCancelChanges() { | ||||
|     AlbumListPage albumListPage = albumPage.cancelChanges(); | ||||
|     var albumListPage = albumPage.cancelChanges(); | ||||
|     albumListPage.navigateToPage(); | ||||
|     assertTrue(albumListPage.isAt()); | ||||
|   } | ||||
|   | ||||
| @@ -23,14 +23,14 @@ | ||||
|  | ||||
| package com.iluwatar.pageobject; | ||||
|  | ||||
| import static org.junit.jupiter.api.Assertions.assertTrue; | ||||
|  | ||||
| import com.gargoylesoftware.htmlunit.WebClient; | ||||
| import com.iluwatar.pageobject.pages.AlbumListPage; | ||||
| import com.iluwatar.pageobject.pages.LoginPage; | ||||
| import org.junit.jupiter.api.BeforeEach; | ||||
| import org.junit.jupiter.api.Test; | ||||
|  | ||||
| import static org.junit.jupiter.api.Assertions.assertTrue; | ||||
|  | ||||
| /** | ||||
|  * Test Login Page Object | ||||
|  */ | ||||
| @@ -45,7 +45,7 @@ public class LoginPageTest { | ||||
|  | ||||
|   @Test | ||||
|   public void testLogin() { | ||||
|     AlbumListPage albumListPage = loginPage | ||||
|     var albumListPage = loginPage | ||||
|         .enterUsername("admin") | ||||
|         .enterPassword("password") | ||||
|         .login(); | ||||
|   | ||||
| @@ -26,7 +26,6 @@ package com.iluwatar.pageobject.pages; | ||||
| import com.gargoylesoftware.htmlunit.WebClient; | ||||
| import com.gargoylesoftware.htmlunit.html.HtmlAnchor; | ||||
| import com.gargoylesoftware.htmlunit.html.HtmlPage; | ||||
|  | ||||
| import java.io.IOException; | ||||
| import java.util.List; | ||||
|  | ||||
| @@ -79,8 +78,8 @@ public class AlbumListPage extends Page { | ||||
|    */ | ||||
|   public AlbumPage selectAlbum(String albumTitle) { | ||||
|     // uses XPath to find list of html anchor tags with the class album in it | ||||
|     List<HtmlAnchor> albumLinks = (List<HtmlAnchor>) page.getByXPath("//tr[@class='album']//a"); | ||||
|     for (HtmlAnchor anchor : albumLinks) { | ||||
|     var albumLinks = (List<HtmlAnchor>) page.getByXPath("//tr[@class='album']//a"); | ||||
|     for (var anchor : albumLinks) { | ||||
|       if (anchor.getTextContent().equals(albumTitle)) { | ||||
|         try { | ||||
|           anchor.click(); | ||||
|   | ||||
| @@ -30,7 +30,6 @@ import com.gargoylesoftware.htmlunit.html.HtmlPage; | ||||
| import com.gargoylesoftware.htmlunit.html.HtmlSelect; | ||||
| import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput; | ||||
| import com.gargoylesoftware.htmlunit.html.HtmlTextInput; | ||||
|  | ||||
| import java.io.IOException; | ||||
|  | ||||
| /** | ||||
| @@ -83,7 +82,7 @@ public class AlbumPage extends Page { | ||||
|    * @return {@link AlbumPage} | ||||
|    */ | ||||
|   public AlbumPage changeAlbumTitle(String albumTitle) { | ||||
|     HtmlTextInput albumTitleInputTextField = (HtmlTextInput) page.getElementById("albumTitle"); | ||||
|     var albumTitleInputTextField = (HtmlTextInput) page.getElementById("albumTitle"); | ||||
|     albumTitleInputTextField.setText(albumTitle); | ||||
|     return this; | ||||
|   } | ||||
| @@ -96,7 +95,7 @@ public class AlbumPage extends Page { | ||||
|    * @return {@link AlbumPage} | ||||
|    */ | ||||
|   public AlbumPage changeArtist(String artist) { | ||||
|     HtmlTextInput artistInputTextField = (HtmlTextInput) page.getElementById("albumArtist"); | ||||
|     var artistInputTextField = (HtmlTextInput) page.getElementById("albumArtist"); | ||||
|     artistInputTextField.setText(artist); | ||||
|     return this; | ||||
|   } | ||||
| @@ -109,8 +108,8 @@ public class AlbumPage extends Page { | ||||
|    * @return {@link AlbumPage} | ||||
|    */ | ||||
|   public AlbumPage changeAlbumYear(int year) { | ||||
|     HtmlSelect albumYearSelectOption = (HtmlSelect) page.getElementById("albumYear"); | ||||
|     HtmlOption yearOption = albumYearSelectOption.getOptionByValue(Integer.toString(year)); | ||||
|     var albumYearSelectOption = (HtmlSelect) page.getElementById("albumYear"); | ||||
|     var yearOption = albumYearSelectOption.getOptionByValue(Integer.toString(year)); | ||||
|     albumYearSelectOption.setSelectedAttribute(yearOption, true); | ||||
|     return this; | ||||
|   } | ||||
| @@ -123,7 +122,7 @@ public class AlbumPage extends Page { | ||||
|    * @return {@link AlbumPage} | ||||
|    */ | ||||
|   public AlbumPage changeAlbumRating(String albumRating) { | ||||
|     HtmlTextInput albumRatingInputTextField = (HtmlTextInput) page.getElementById("albumRating"); | ||||
|     var albumRatingInputTextField = (HtmlTextInput) page.getElementById("albumRating"); | ||||
|     albumRatingInputTextField.setText(albumRating); | ||||
|     return this; | ||||
|   } | ||||
| @@ -135,7 +134,7 @@ public class AlbumPage extends Page { | ||||
|    * @return {@link AlbumPage} | ||||
|    */ | ||||
|   public AlbumPage changeNumberOfSongs(int numberOfSongs) { | ||||
|     HtmlNumberInput numberOfSongsNumberField = (HtmlNumberInput) page.getElementById("numberOfSongs"); | ||||
|     var numberOfSongsNumberField = (HtmlNumberInput) page.getElementById("numberOfSongs"); | ||||
|     numberOfSongsNumberField.setText(Integer.toString(numberOfSongs)); | ||||
|     return this; | ||||
|   } | ||||
| @@ -147,7 +146,7 @@ public class AlbumPage extends Page { | ||||
|    * @return {@link AlbumListPage} | ||||
|    */ | ||||
|   public AlbumListPage cancelChanges() { | ||||
|     HtmlSubmitInput cancelButton = (HtmlSubmitInput) page.getElementById("cancelButton"); | ||||
|     var cancelButton = (HtmlSubmitInput) page.getElementById("cancelButton"); | ||||
|     try { | ||||
|       cancelButton.click(); | ||||
|     } catch (IOException e) { | ||||
| @@ -163,7 +162,7 @@ public class AlbumPage extends Page { | ||||
|    * @return {@link AlbumPage} | ||||
|    */ | ||||
|   public AlbumPage saveChanges() { | ||||
|     HtmlSubmitInput saveButton = (HtmlSubmitInput) page.getElementById("saveButton"); | ||||
|     var saveButton = (HtmlSubmitInput) page.getElementById("saveButton"); | ||||
|     try { | ||||
|       saveButton.click(); | ||||
|     } catch (IOException e) { | ||||
|   | ||||
| @@ -79,7 +79,7 @@ public class LoginPage extends Page { | ||||
|    * @return {@link LoginPage} | ||||
|    */ | ||||
|   public LoginPage enterUsername(String username) { | ||||
|     HtmlTextInput usernameInputTextField = (HtmlTextInput) page.getElementById("username"); | ||||
|     var usernameInputTextField = (HtmlTextInput) page.getElementById("username"); | ||||
|     usernameInputTextField.setText(username); | ||||
|     return this; | ||||
|   } | ||||
| @@ -92,7 +92,7 @@ public class LoginPage extends Page { | ||||
|    * @return {@link LoginPage} | ||||
|    */ | ||||
|   public LoginPage enterPassword(String password) { | ||||
|     HtmlPasswordInput passwordInputPasswordField = (HtmlPasswordInput) page.getElementById("password"); | ||||
|     var passwordInputPasswordField = (HtmlPasswordInput) page.getElementById("password"); | ||||
|     passwordInputPasswordField.setText(password); | ||||
|     return this; | ||||
|   } | ||||
| @@ -101,11 +101,11 @@ public class LoginPage extends Page { | ||||
|   /** | ||||
|    * Clicking on the login button to 'login' | ||||
|    * | ||||
|    * @return {@link AlbumListPage} | ||||
|    *        - this is the page that user gets navigated to once successfully logged in | ||||
|    * @return {@link AlbumListPage} - this is the page that user gets navigated to once successfully | ||||
|    *     logged in | ||||
|    */ | ||||
|   public AlbumListPage login() { | ||||
|     HtmlSubmitInput loginButton = (HtmlSubmitInput) page.getElementById("loginButton"); | ||||
|     var loginButton = (HtmlSubmitInput) page.getElementById("loginButton"); | ||||
|     try { | ||||
|       loginButton.click(); | ||||
|     } catch (IOException e) { | ||||
|   | ||||
| @@ -31,8 +31,7 @@ import com.gargoylesoftware.htmlunit.WebClient; | ||||
| public abstract class Page { | ||||
|  | ||||
|   /** | ||||
|    * Application Under Test path | ||||
|    * This directory location is where html web pages are located | ||||
|    * Application Under Test path This directory location is where html web pages are located | ||||
|    */ | ||||
|   public static final String AUT_PATH = "src/main/resources/sample-ui/"; | ||||
|  | ||||
|   | ||||
| @@ -81,8 +81,8 @@ public class AlbumListPage extends Page { | ||||
|    */ | ||||
|   public AlbumPage selectAlbum(String albumTitle) { | ||||
|     // uses XPath to find list of html anchor tags with the class album in it | ||||
|     List<HtmlAnchor> albumLinks = (List<HtmlAnchor>) page.getByXPath("//tr[@class='album']//a"); | ||||
|     for (HtmlAnchor anchor : albumLinks) { | ||||
|     var albumLinks = (List<HtmlAnchor>) page.getByXPath("//tr[@class='album']//a"); | ||||
|     for (var anchor : albumLinks) { | ||||
|       if (anchor.getTextContent().equals(albumTitle)) { | ||||
|         try { | ||||
|           anchor.click(); | ||||
|   | ||||
| @@ -25,7 +25,6 @@ package com.iluwatar.pageobject; | ||||
|  | ||||
| import com.gargoylesoftware.htmlunit.WebClient; | ||||
| import com.gargoylesoftware.htmlunit.html.HtmlNumberInput; | ||||
| import com.gargoylesoftware.htmlunit.html.HtmlOption; | ||||
| import com.gargoylesoftware.htmlunit.html.HtmlPage; | ||||
| import com.gargoylesoftware.htmlunit.html.HtmlSelect; | ||||
| import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput; | ||||
| @@ -85,7 +84,7 @@ public class AlbumPage extends Page { | ||||
|    * @return {@link AlbumPage} | ||||
|    */ | ||||
|   public AlbumPage changeAlbumTitle(String albumTitle) { | ||||
|     HtmlTextInput albumTitleInputTextField = (HtmlTextInput) page.getElementById("albumTitle"); | ||||
|     var albumTitleInputTextField = (HtmlTextInput) page.getElementById("albumTitle"); | ||||
|     albumTitleInputTextField.setText(albumTitle); | ||||
|     return this; | ||||
|   } | ||||
| @@ -98,7 +97,7 @@ public class AlbumPage extends Page { | ||||
|    * @return {@link AlbumPage} | ||||
|    */ | ||||
|   public AlbumPage changeArtist(String artist) { | ||||
|     HtmlTextInput artistInputTextField = (HtmlTextInput) page.getElementById("albumArtist"); | ||||
|     var artistInputTextField = (HtmlTextInput) page.getElementById("albumArtist"); | ||||
|     artistInputTextField.setText(artist); | ||||
|     return this; | ||||
|   } | ||||
| @@ -111,8 +110,8 @@ public class AlbumPage extends Page { | ||||
|    * @return {@link AlbumPage} | ||||
|    */ | ||||
|   public AlbumPage changeAlbumYear(int year) { | ||||
|     HtmlSelect albumYearSelectOption = (HtmlSelect) page.getElementById("albumYear"); | ||||
|     HtmlOption yearOption = albumYearSelectOption.getOptionByValue(Integer.toString(year)); | ||||
|     var albumYearSelectOption = (HtmlSelect) page.getElementById("albumYear"); | ||||
|     var yearOption = albumYearSelectOption.getOptionByValue(Integer.toString(year)); | ||||
|     albumYearSelectOption.setSelectedAttribute(yearOption, true); | ||||
|     return this; | ||||
|   } | ||||
| @@ -125,7 +124,7 @@ public class AlbumPage extends Page { | ||||
|    * @return {@link AlbumPage} | ||||
|    */ | ||||
|   public AlbumPage changeAlbumRating(String albumRating) { | ||||
|     HtmlTextInput albumRatingInputTextField = (HtmlTextInput) page.getElementById("albumRating"); | ||||
|     var albumRatingInputTextField = (HtmlTextInput) page.getElementById("albumRating"); | ||||
|     albumRatingInputTextField.setText(albumRating); | ||||
|     return this; | ||||
|   } | ||||
| @@ -137,8 +136,7 @@ public class AlbumPage extends Page { | ||||
|    * @return {@link AlbumPage} | ||||
|    */ | ||||
|   public AlbumPage changeNumberOfSongs(int numberOfSongs) { | ||||
|     HtmlNumberInput numberOfSongsNumberField = | ||||
|         (HtmlNumberInput) page.getElementById("numberOfSongs"); | ||||
|     var numberOfSongsNumberField = (HtmlNumberInput) page.getElementById("numberOfSongs"); | ||||
|     numberOfSongsNumberField.setText(Integer.toString(numberOfSongs)); | ||||
|     return this; | ||||
|   } | ||||
| @@ -150,7 +148,7 @@ public class AlbumPage extends Page { | ||||
|    * @return {@link AlbumListPage} | ||||
|    */ | ||||
|   public AlbumListPage cancelChanges() { | ||||
|     HtmlSubmitInput cancelButton = (HtmlSubmitInput) page.getElementById("cancelButton"); | ||||
|     var cancelButton = (HtmlSubmitInput) page.getElementById("cancelButton"); | ||||
|     try { | ||||
|       cancelButton.click(); | ||||
|     } catch (IOException e) { | ||||
| @@ -166,7 +164,7 @@ public class AlbumPage extends Page { | ||||
|    * @return {@link AlbumPage} | ||||
|    */ | ||||
|   public AlbumPage saveChanges() { | ||||
|     HtmlSubmitInput saveButton = (HtmlSubmitInput) page.getElementById("saveButton"); | ||||
|     var saveButton = (HtmlSubmitInput) page.getElementById("saveButton"); | ||||
|     try { | ||||
|       saveButton.click(); | ||||
|     } catch (IOException e) { | ||||
|   | ||||
| @@ -82,7 +82,7 @@ public class LoginPage extends Page { | ||||
|    * @return {@link LoginPage} | ||||
|    */ | ||||
|   public LoginPage enterUsername(String username) { | ||||
|     HtmlTextInput usernameInputTextField = (HtmlTextInput) page.getElementById("username"); | ||||
|     var usernameInputTextField = (HtmlTextInput) page.getElementById("username"); | ||||
|     usernameInputTextField.setText(username); | ||||
|     return this; | ||||
|   } | ||||
| @@ -95,8 +95,7 @@ public class LoginPage extends Page { | ||||
|    * @return {@link LoginPage} | ||||
|    */ | ||||
|   public LoginPage enterPassword(String password) { | ||||
|     HtmlPasswordInput passwordInputPasswordField = | ||||
|         (HtmlPasswordInput) page.getElementById("password"); | ||||
|     var passwordInputPasswordField = (HtmlPasswordInput) page.getElementById("password"); | ||||
|     passwordInputPasswordField.setText(password); | ||||
|     return this; | ||||
|   } | ||||
| @@ -109,7 +108,7 @@ public class LoginPage extends Page { | ||||
|    *     logged in | ||||
|    */ | ||||
|   public AlbumListPage login() { | ||||
|     HtmlSubmitInput loginButton = (HtmlSubmitInput) page.getElementById("loginButton"); | ||||
|     var loginButton = (HtmlSubmitInput) page.getElementById("loginButton"); | ||||
|     try { | ||||
|       loginButton.click(); | ||||
|     } catch (IOException e) { | ||||
|   | ||||
| @@ -23,14 +23,12 @@ | ||||
|  | ||||
| package com.iluwatar.pageobject; | ||||
|  | ||||
| import static org.junit.jupiter.api.Assertions.assertTrue; | ||||
|  | ||||
| import com.gargoylesoftware.htmlunit.WebClient; | ||||
| import com.iluwatar.pageobject.AlbumListPage; | ||||
| import com.iluwatar.pageobject.AlbumPage; | ||||
| import org.junit.jupiter.api.BeforeEach; | ||||
| import org.junit.jupiter.api.Test; | ||||
|  | ||||
| import static org.junit.jupiter.api.Assertions.assertTrue; | ||||
|  | ||||
| /** | ||||
|  * Test Album Selection and Album Listing | ||||
|  */ | ||||
| @@ -45,7 +43,7 @@ public class AlbumListPageTest { | ||||
|  | ||||
|   @Test | ||||
|   public void testSelectAlbum() { | ||||
|     AlbumPage albumPage = albumListPage.selectAlbum("21"); | ||||
|     var albumPage = albumListPage.selectAlbum("21"); | ||||
|     albumPage.navigateToPage(); | ||||
|     assertTrue(albumPage.isAt()); | ||||
|   } | ||||
|   | ||||
| @@ -25,11 +25,10 @@ package com.iluwatar.pageobject; | ||||
|  | ||||
| import static org.junit.jupiter.api.Assertions.assertTrue; | ||||
|  | ||||
| import com.gargoylesoftware.htmlunit.WebClient; | ||||
| import org.junit.jupiter.api.BeforeEach; | ||||
| import org.junit.jupiter.api.Test; | ||||
|  | ||||
| import com.gargoylesoftware.htmlunit.WebClient; | ||||
|  | ||||
| /** | ||||
|  * Test Album Page Operations | ||||
|  */ | ||||
| @@ -45,7 +44,7 @@ public class AlbumPageTest { | ||||
|   @Test | ||||
|   public void testSaveAlbum() { | ||||
|  | ||||
|     AlbumPage albumPageAfterChanges = albumPage | ||||
|     var albumPageAfterChanges = albumPage | ||||
|         .changeAlbumTitle("25") | ||||
|         .changeArtist("Adele Laurie Blue Adkins") | ||||
|         .changeAlbumYear(2015) | ||||
| @@ -59,7 +58,7 @@ public class AlbumPageTest { | ||||
|  | ||||
|   @Test | ||||
|   public void testCancelChanges() { | ||||
|     AlbumListPage albumListPage = albumPage.cancelChanges(); | ||||
|     var albumListPage = albumPage.cancelChanges(); | ||||
|     albumListPage.navigateToPage(); | ||||
|     assertTrue(albumListPage.isAt()); | ||||
|   } | ||||
|   | ||||
| @@ -25,11 +25,10 @@ package com.iluwatar.pageobject; | ||||
|  | ||||
| import static org.junit.jupiter.api.Assertions.assertTrue; | ||||
|  | ||||
| import com.gargoylesoftware.htmlunit.WebClient; | ||||
| import org.junit.jupiter.api.BeforeEach; | ||||
| import org.junit.jupiter.api.Test; | ||||
|  | ||||
| import com.gargoylesoftware.htmlunit.WebClient; | ||||
|  | ||||
| /** | ||||
|  * Test Login Page Object | ||||
|  */ | ||||
| @@ -44,7 +43,7 @@ public class LoginPageTest { | ||||
|  | ||||
|   @Test | ||||
|   public void testLogin() { | ||||
|     AlbumListPage albumListPage = loginPage | ||||
|     var albumListPage = loginPage | ||||
|         .enterUsername("admin") | ||||
|         .enterPassword("password") | ||||
|         .login(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user