List of usage examples for javafx.beans.property ReadOnlyBooleanWrapper ReadOnlyBooleanWrapper
public ReadOnlyBooleanWrapper(boolean initialValue)
From source file:com.adobe.ags.curly.test.ConnectionManagerTest.java
@Test public void getAuthenticatedConnection() throws IOException { webserver.requireLogin = true;// ww w . j a v a2s.c om AuthHandler handler = new AuthHandler(new ReadOnlyStringWrapper("localhost:" + webserver.port), new ReadOnlyBooleanWrapper(false), new ReadOnlyStringWrapper(TEST_USER), new ReadOnlyStringWrapper(TEST_PASSWORD)); CloseableHttpClient client = handler.getAuthenticatedClient(); assertNotNull(client); HttpUriRequest request = new HttpGet("http://localhost:" + webserver.port + "/testUri"); client.execute(request); Header authHeader = webserver.lastRequest.getFirstHeader("Authorization"); assertNotNull(authHeader); String compareToken = "Basic " + Base64.getEncoder().encodeToString((TEST_USER + ":" + TEST_PASSWORD).getBytes()); assertEquals("Auth token should be expected format", authHeader.getValue(), compareToken); }
From source file:com.adobe.ags.curly.test.ErrorBehaviorTest.java
@Before public void setUp() { ApplicationState.getInstance().runningProperty().set(true); handler = new AuthHandler(new ReadOnlyStringWrapper("localhost:" + webserver.port), new ReadOnlyBooleanWrapper(false), new ReadOnlyStringWrapper(TEST_USER), new ReadOnlyStringWrapper(TEST_PASSWORD)); client = handler.getAuthenticatedClient(); }