@PowerMockRunnerDelegate(value=org.junit.experimental.theories.Theories.class) @MockPolicy(value=SharedSetUp.class) @PrepareForTest(value={Utils.class,com.fasterxml.jackson.databind.ObjectMapper.class,ExchangeAdapterFactory.class,Test2ExchangeAdapter.class,AdaptvAdapter.class,javax.ws.rs.core.Response.class,LogUtils.class}) @PowerMockIgnore(value={"javax.crypto.*","javax.management.*"}) public class AdminSvcSpec_debug2 extends Object
| Modifier and Type | Field and Description |
|---|---|
private ExchangeAdapter<?,?> |
adapterMock |
private javax.ws.rs.container.AsyncResponse |
asyncResponseMock |
private String |
authCookie |
private Ad |
debugAd |
private String |
debugAdId |
private Bid |
debugBid |
private String |
debugBidId |
private String |
debugImpId |
private Tag |
debugTag |
private String |
debugTagId |
static String[] |
responseTypes |
private ServiceRunner |
serviceRunnerMock |
private javax.servlet.http.HttpServletRequest |
servletRequestMock |
private AdminSvc |
svc |
private com.fasterxml.jackson.databind.ObjectMapper |
utilsMapper |
| Constructor and Description |
|---|
AdminSvcSpec_debug2() |
private com.fasterxml.jackson.databind.ObjectMapper utilsMapper
private ServiceRunner serviceRunnerMock
private javax.servlet.http.HttpServletRequest servletRequestMock
private javax.ws.rs.container.AsyncResponse asyncResponseMock
private String authCookie
private AdminSvc svc
private Ad debugAd
private String debugAdId
private Tag debugTag
private String debugTagId
private Bid debugBid
private String debugBidId
private String debugImpId
private ExchangeAdapter<?,?> adapterMock
public static String[] responseTypes
private void configMocks(String host, Ad[] allAds, String exchangeName, boolean isNurlRequired) throws Throwable
Throwableprivate void configMocksForAdaptvAdapter()
private ExchangeAdapter<?,?> createExchangeAdapterMock(String exchangeName, org.mockito.stubbing.Answer<Object> defaultAnswer, boolean isNurlRequired) throws Throwable
Throwableprivate void configServletRequestMock(String exchangeName, String macroType, String macroKey, String macroVal)
public void negativeFlow_throwsExceptionIfAdNotFound()
throws Throwable
Throwablepublic void negativeFlow_throwsExceptionIfTagNotFound()
throws Throwable
Throwablepublic void negativeFlow_throwsExceptionIfExchangeIsNull()
throws Throwable
Throwablepublic void negativeFlow_throwsExceptionIfExchangeAdapterNotFound()
throws Throwable
Throwablepublic void positiveFlow_avoidsHangProgramWithSomeCombinationsOfMacro()
throws Throwable
Throwablepublic void negativeFlow_throwsExceptionIfErrorOccursInConvertResponse()
throws Throwable
Throwablepublic void positiveFlow_returnsExpectedResponseIfResponseTypeIsFullJsonAndConvertResponseReturnsString()
throws Throwable
Throwablepublic void negativeFlow_throwsExceptionIfResponseTypeIsFullJsonAndErrorOccursInWriteValueAsString()
throws Throwable
Throwablepublic void negativeFlow_throwsExceptionIfResponseTypeIsTagContainerAndTagIsVideoAndBaseUrlIsBad()
throws Throwable
Throwablepublic void negativeFlow_throwsExceptionIfResponseTypeIsUnknown()
throws Throwable
Throwablepublic void positiveFlow_returnsExpectedResponseIfTagIsBanner(String responseType) throws Throwable
Throwablepublic void positiveFlow_returnsExpectedResponseIfTagIsVideo(String responseType) throws Throwable
Throwableprivate void testDebug2(boolean isBanner,
String exchangeName,
boolean isNurlRequired)
throws Throwable
Throwable