You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2020/06/01 19:03:18 UTC

[juneau] branch master updated: MockRestClient improvements.

This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new 05b4c82  MockRestClient improvements.
05b4c82 is described below

commit 05b4c82894e5c85c85c8589d2e9b7dc1a3f954b5
Author: JamesBognar <ja...@salesforce.com>
AuthorDate: Mon Jun 1 15:03:04 2020 -0400

    MockRestClient improvements.
---
 .../juneau/rest/mock2/MockServletRequest.java      | 101 ---------------------
 1 file changed, 101 deletions(-)

diff --git a/juneau-rest/juneau-rest-mock/src/main/java/org/apache/juneau/rest/mock2/MockServletRequest.java b/juneau-rest/juneau-rest-mock/src/main/java/org/apache/juneau/rest/mock2/MockServletRequest.java
index 6e67e0d..d483ec8 100644
--- a/juneau-rest/juneau-rest-mock/src/main/java/org/apache/juneau/rest/mock2/MockServletRequest.java
+++ b/juneau-rest/juneau-rest-mock/src/main/java/org/apache/juneau/rest/mock2/MockServletRequest.java
@@ -114,107 +114,6 @@ public class MockServletRequest implements HttpServletRequest, MockHttpRequest {
 	}
 
 	/**
-	 * Specifies the <c>Accept</c> header value.
-	 *
-	 * @param value The <c>Accept</c> header value.
-	 * @return This object (for method chaining).
-	 */
-	public MockServletRequest accept(String value) {
-		return header("Accept", value);
-	}
-
-	/**
-	 * Specifies the <c>Content-Type</c> header value.
-	 *
-	 * @param value The <c>Content-Type</c> header value.
-	 * @return This object (for method chaining).
-	 */
-	public MockServletRequest contentType(String value) {
-		return header("Content-Type", value);
-	}
-
-	/**
-	 * Convenience method for setting <c>Accept</c> and <c>Content-Type</c> headers to <js>"application/json"</js>.
-	 *
-	 * @return This object (for method chaining).
-	 */
-	public MockServletRequest json() {
-		return accept("application/json").contentType("application/json");
-	}
-
-	/**
-	 * Convenience method for setting <c>Accept</c> and <c>Content-Type</c> headers to <js>"application/json+simple"</js>.
-	 *
-	 * @return This object (for method chaining).
-	 */
-	public MockServletRequest simpleJson() {
-		return accept("application/json+simple").contentType("application/json+simple");
-	}
-
-	/**
-	 * Convenience method for setting <c>Accept</c> and <c>Content-Type</c> headers to <js>"text/xml"</js>.
-	 *
-	 * @return This object (for method chaining).
-	 */
-	public MockServletRequest xml() {
-		return accept("text/xml").contentType("text/xml");
-	}
-
-	/**
-	 * Convenience method for setting <c>Accept</c> and <c>Content-Type</c> headers to <js>"text/html"</js>.
-	 *
-	 * @return This object (for method chaining).
-	 */
-	public MockServletRequest html() {
-		return accept("text/html").contentType("text/html");
-	}
-
-	/**
-	 * Convenience method for setting <c>Accept</c> and <c>Content-Type</c> headers to <js>"text/plain"</js>.
-	 *
-	 * @return This object (for method chaining).
-	 */
-	public MockServletRequest plainText() {
-		return accept("text/plain").contentType("text/plain");
-	}
-
-	/**
-	 * Convenience method for setting <c>Accept</c> and <c>Content-Type</c> headers to <js>"octal/msgpack"</js>.
-	 *
-	 * @return This object (for method chaining).
-	 */
-	public MockServletRequest msgpack() {
-		return accept("octal/msgpack").contentType("octal/msgpack");
-	}
-
-	/**
-	 * Convenience method for setting <c>Accept</c> and <c>Content-Type</c> headers to <js>"text/uon"</js>.
-	 *
-	 * @return This object (for method chaining).
-	 */
-	public MockServletRequest uon() {
-		return accept("text/uon").contentType("text/uon");
-	}
-
-	/**
-	 * Convenience method for setting <c>Accept</c> and <c>Content-Type</c> headers to <js>"application/x-www-form-urlencoded"</js>.
-	 *
-	 * @return This object (for method chaining).
-	 */
-	public MockServletRequest urlEnc() {
-		return accept("application/x-www-form-urlencoded").contentType("application/x-www-form-urlencoded");
-	}
-
-	/**
-	 * Convenience method for setting <c>Accept</c> and <c>Content-Type</c> headers to <js>"text/yaml"</js>.
-	 *
-	 * @return This object (for method chaining).
-	 */
-	public MockServletRequest yaml() {
-		return accept("text/yaml").contentType("text/yaml");
-	}
-
-	/**
 	 * Fluent setter.
 	 *
 	 * @param uri The URI of the request.