Skip to content

Commit

Permalink
Implements absent methods in context mocker
Browse files Browse the repository at this point in the history
Signed-off-by: avpinchuk <alexander.v.pinchuk@gmail.com>
  • Loading branch information
avpinchuk committed Oct 25, 2022
1 parent b1a721f commit a6cd348
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import jakarta.faces.context.FacesContext;
import jakarta.faces.context.ResponseStream;
import jakarta.faces.context.ResponseWriter;
import jakarta.faces.lifecycle.Lifecycle;
import jakarta.faces.render.RenderKit;
import org.mockito.Mockito;

Expand All @@ -52,6 +53,11 @@ public static void init(){
setCurrentInstance(_ctx);
}

@Override
public Lifecycle getLifecycle() {
return Mockito.mock(Lifecycle.class);
}

@Override
public ExternalContext getExternalContext() {
return _extCtx;
Expand Down Expand Up @@ -329,5 +335,10 @@ public void redirect(String url) throws IOException {
public String encodeWebsocketURL(String string) {
throw new UnsupportedOperationException("Not supported.");
}

@Override
public void release() {
throw new UnsupportedOperationException("Not supported");
}
}
}

0 comments on commit a6cd348

Please sign in to comment.