Skip to content

Instantly share code, notes, and snippets.

View britt's full-sized avatar

Britt Crawford britt

View GitHub Profile
def get_job_names
context.getBeansOfType(JobConf).collect do |beanGetJobName,bean|
bean.getJobName
end
end
public String[] getJobNames() {
return Transform.map(new Unary<JobConf, String>(){
public String f(JobConf item) {
return item.getJobName();
}
}, context.getBeansOfType(JobConf.class).values()).toArray(new String[]{});
}
javascript:(
function(){
var k=" -site:expertsexchange.com -site:swik.net";
if(document.f){
document.f.q.value=document.f.q.value+k;
}else{
document.gs.q.value=document.gs.q.value+k
}})()
javascript:(function(){var k=" -site:experts-exchange.com -site:swik.net";if(document.f){document.f.q.value=document.f.q.value+k;}else{document.gs.q.value=document.gs.q.value+k}})()
public BookInfoJaxBImpl(BookInfo bookInfo) {
if(bookInfo==null)
throw new IllegalArgumentException("BookInfo passed into the constructor cannot be null.");
else
load(bookInfo);
}
private void load(BookInfo bookInfo) {
//load the values of BookInfo into this instance
}
$: << File.dirname(__FILE__)
require 'spec_helper'
describe "Product REST Service findByUpdateDate" do
before(:each) do
end
it 'should only find products created within the date ran ge given' do
@Test
public void shouldLoadAllBeansFromSpringContext() throws Exception {
for(String bean : new String[]{"productInputFormat", "upgradingMapper", "upgradeJob"})
Assert.assertNotNull(context.getBean(bean));
}