本文整理了Java中org.easymock.classextension.EasyMock.getCurrentArguments()
方法的一些代码示例,展示了EasyMock.getCurrentArguments()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EasyMock.getCurrentArguments()
方法的具体详情如下:
包路径:org.easymock.classextension.EasyMock
类名称:EasyMock
方法名:getCurrentArguments
暂无
代码示例来源:origin: BroadleafCommerce/BroadleafCommerce
@Override
public Order answer() throws Throwable {
return (Order) EasyMock.getCurrentArguments()[0];
}
};
代码示例来源:origin: BroadleafCommerce/BroadleafCommerce
@Override
public FulfillmentGroupItem answer() throws Throwable {
return (FulfillmentGroupItem) EasyMock.getCurrentArguments()[0];
}
};
代码示例来源:origin: BroadleafCommerce/BroadleafCommerce
@Override
public OrderItem answer() throws Throwable {
Order order = (Order) EasyMock.getCurrentArguments()[0];
order.getOrderItems().add((OrderItem) EasyMock.getCurrentArguments()[1]);
if (((OrderItem) EasyMock.getCurrentArguments()[1]).getId() == null) {
((OrderItem) EasyMock.getCurrentArguments()[1]).setId(OfferDataItemProvider.getOrderItemId());
}
return (OrderItem) EasyMock.getCurrentArguments()[1];
}
};
代码示例来源:origin: geoserver/geoserver
@Override
public Object answer() throws Throwable {
CatalogVisitor visitor = (CatalogVisitor) EasyMock.getCurrentArguments()[0];
doVisit(visitor);
return null;
}
代码示例来源:origin: BroadleafCommerce/BroadleafCommerce
@Override
public Order answer() throws Throwable {
Long orderId = (Long) EasyMock.getCurrentArguments()[0];
Order order = orders.get(orderId);
Iterator<OrderItem> orderItemItr = order.getOrderItems().listIterator();
while (orderItemItr.hasNext()) {
OrderItem item = orderItemItr.next();
if (item.getId().equals(EasyMock.getCurrentArguments()[1])) {
orderItemItr.remove();
}
}
for (FulfillmentGroup fg : order.getFulfillmentGroups()) {
Iterator<FulfillmentGroupItem> itr = fg.getFulfillmentGroupItems().iterator();
while (itr.hasNext()) {
if (itr.next().getOrderItem().getId().equals(EasyMock.getCurrentArguments()[1])) {
itr.remove();
}
}
}
return order;
}
};
代码示例来源:origin: BroadleafCommerce/BroadleafCommerce
@Override
public Order answer() throws Throwable {
Order order = (Order) EasyMock.getCurrentArguments()[0];
order.setId(getOrderId());
orders.put(order.getId(), order);
return order;
}
};
代码示例来源:origin: BroadleafCommerce/BroadleafCommerce
@Override
public OrderItem answer() throws Throwable {
OrderItem orderItem = (OrderItem) EasyMock.getCurrentArguments()[0];
if (orderItem.getId() == null) {
orderItem.setId(getOrderItemId());
}
return orderItem;
}
};
代码示例来源:origin: BroadleafCommerce/BroadleafCommerce
@Override
public FulfillmentGroup answer() throws Throwable {
FulfillmentGroupItemRequest fgItemRequest = (FulfillmentGroupItemRequest) EasyMock.getCurrentArguments()[0];
FulfillmentGroup fg = fgItemRequest.getFulfillmentGroup();
FulfillmentGroupItem fgItem = new FulfillmentGroupItemImpl();
fgItem.setOrderItem(fgItemRequest.getOrderItem());
fgItem.setQuantity(fgItemRequest.getQuantity());
fg.getFulfillmentGroupItems().add(fgItem);
return fg;
}
};
代码示例来源:origin: info.magnolia/magnolia-module-templating
public URL answer() throws Throwable {
String path = (String) getCurrentArguments()[0];
return new URL(path);
}
});
代码示例来源:origin: info.magnolia/magnolia-module-templating
public ParagraphRenderer answer() throws Throwable {
return paragraphRenderers.get(getCurrentArguments()[0]);
}
});
代码示例来源:origin: info.magnolia/magnolia-module-templating
public Template answer() throws Throwable {
return templates.get(getCurrentArguments()[0]);
}
});
代码示例来源:origin: info.magnolia/magnolia-module-templating
public TemplateRenderer answer() throws Throwable {
return templateRenderers.get(getCurrentArguments()[0]);
}
});
代码示例来源:origin: info.magnolia/magnolia-module-templating
public Paragraph answer() throws Throwable {
return paragraphs.get(getCurrentArguments()[0]);
}
});
代码示例来源:origin: info.magnolia/magnolia-module-templating
public InputStream answer() throws Throwable {
String path = (String) getCurrentArguments()[0];
if (path.equals("/WEB-INF/web.xml")) {
return null;
}
return new URL(path).openStream();
}
});
代码示例来源:origin: org.geoserver.security/gs-security-tests
@Override
public GridCoverage2D answer() throws Throwable {
GeneralParameterValue[] params =
(GeneralParameterValue[]) EasyMock.getCurrentArguments()[0];
ParameterValue param = (ParameterValue) params[0];
Filter filter = (Filter) param.getValue();
assertEquals(Predicates.and(requestFilter, securityFilter), filter);
return null;
}
});
内容来源于网络,如有侵权,请联系作者删除!