-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e64f086
commit 0b1d642
Showing
9 changed files
with
1,384 additions
and
836 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
199 changes: 199 additions & 0 deletions
199
src/test/java/org/jenkinsci/plugins/oic/MockHttpServletResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
package org.jenkinsci.plugins.oic; | ||
|
||
import java.io.IOException; | ||
import java.io.PrintWriter; | ||
import java.util.Collection; | ||
import java.util.Locale; | ||
import javax.servlet.ServletOutputStream; | ||
import javax.servlet.http.Cookie; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
public class MockHttpServletResponse implements HttpServletResponse { | ||
|
||
public MockHttpServletResponse() {} | ||
|
||
@Override | ||
public void addCookie(Cookie cookie) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public boolean containsHeader(String s) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public String encodeURL(String s) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public String encodeRedirectURL(String s) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public String encodeUrl(String s) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public String encodeRedirectUrl(String s) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void sendError(int i, String s) throws IOException { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void sendError(int i) throws IOException { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void sendRedirect(String s) throws IOException { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void setDateHeader(String s, long l) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void addDateHeader(String s, long l) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void setHeader(String s, String s1) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void addHeader(String s, String s1) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void setIntHeader(String s, int i) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void addIntHeader(String s, int i) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void setStatus(int i) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void setStatus(int i, String s) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public int getStatus() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public String getHeader(String s) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public Collection<String> getHeaders(String s) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public Collection<String> getHeaderNames() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public String getCharacterEncoding() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public String getContentType() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public ServletOutputStream getOutputStream() throws IOException { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public PrintWriter getWriter() throws IOException { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void setCharacterEncoding(String s) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void setContentLength(int i) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void setContentLengthLong(long l) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void setContentType(String s) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void setBufferSize(int i) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public int getBufferSize() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void flushBuffer() throws IOException { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void resetBuffer() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public boolean isCommitted() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void reset() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public void setLocale(Locale locale) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public Locale getLocale() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
} |
Oops, something went wrong.