use of org.codice.ddf.security.impl.Security in project ddf by codice.
the class CommandJobTest method testUnableToGetSessionFactory.
/**
* Tests that there is no exception when unable to get the {@link SessionFactory}
*/
@Test
public void testUnableToGetSessionFactory() {
// given
CommandJob commandJob = new CommandJob(new Security()) {
@Override
public Subject getSystemSubject() {
return createMockSubject();
}
@Override
protected SessionFactory getSessionFactory() {
return null;
}
};
String command = VALID_COMMAND;
// when
commandJob.execute(createMockJobExecutionContext(command));
}
use of org.codice.ddf.security.impl.Security in project ddf by codice.
the class CommandJobTest method testNullContext.
/**
* Tests that there is no exception when the {@link JobExecutionContext} is null
*/
@Test
public void testNullContext() {
// given
CommandJob commandJob = new CommandJob(new Security());
// when
commandJob.execute(null);
}
use of org.codice.ddf.security.impl.Security in project ddf by codice.
the class CommandJobTest method testNullCommand.
/**
* Tests that there is no exception when command input is null
*/
@Test
public void testNullCommand() {
// given
CommandJob commandJob = new CommandJob(new Security());
String command = null;
// when
commandJob.execute(createMockJobExecutionContext(command));
}
Aggregations