use of nl.nn.adapterframework.util.Locker in project iaf by ibissource.
the class IbisJobDetailTest method compareOtherLocker.
@Test
public void compareOtherLocker() throws Exception {
Locker locker = new Locker() {
@Override
public void configure() {
// override configure, to avoid having to fully configure the Locker. We just use it's existence here.
}
};
jobDef2.setLocker(locker);
jobDef1.configure();
jobDef2.configure();
IbisJobDetail jobDetail1 = (IbisJobDetail) IbisJobBuilder.fromJobDef(jobDef1).build();
assertFalse(jobDetail1.compareWith(jobDef2));
}
use of nl.nn.adapterframework.util.Locker in project iaf by ibissource.
the class IbisJobDetailTest method compareOneLocker.
@Test
public void compareOneLocker() throws Exception {
Locker locker = new Locker() {
@Override
public void configure() {
// override configure, to avoid having to fully configure the Locker. We just use it's existence here.
}
};
jobDef1.setLocker(locker);
jobDef1.configure();
jobDef2.configure();
IbisJobDetail jobDetail1 = (IbisJobDetail) IbisJobBuilder.fromJobDef(jobDef1).build();
assertFalse(jobDetail1.compareWith(jobDef2));
}
use of nl.nn.adapterframework.util.Locker in project iaf by ibissource.
the class IbisJobDetailTest method compareEqualLocker.
@Test
public void compareEqualLocker() throws Exception {
Locker locker1 = new Locker() {
@Override
public void configure() {
// override configure, to avoid having to fully configure the Locker. We just use it's objectId here.
}
@Override
public String getObjectId() {
return "fakeObjectId";
}
};
jobDef1.setLocker(locker1);
Locker locker2 = new Locker() {
@Override
public void configure() {
// override configure, to avoid having to fully configure the Locker. We just use it's objectId here.
}
@Override
public String getObjectId() {
return "fakeObjectId";
}
};
jobDef2.setLocker(locker2);
jobDef1.configure();
jobDef2.configure();
IbisJobDetail jobDetail1 = (IbisJobDetail) IbisJobBuilder.fromJobDef(jobDef1).build();
assertTrue(jobDetail1.compareWith(jobDef2));
}
Aggregations