@Before public void init() { List<Role> roles = new ArrayList<>(Arrays.asList(new Role[] {Role.ADMIN})); IUser worker = factory.user("login", "email", "pw", "name", "ame", roles); long code = 3; Date openingDate = new Date(); String title = "title"; List<Localization> localizations = Arrays.asList(new Localization[] {Localization.COIMBRA}); PositionState state = PositionState.OPEN; int vacancies = 4; Date closingDate = new Date(); int sla = 2; String description = "description"; IUser person = null; String company = "company"; List<TechnicalArea> tech = Arrays.asList(new TechnicalArea[] {TechnicalArea.JAVA_DEVELOPMENT}); List<IPublicationChannel> pub = Arrays.asList(new PublicationChannelProxy[] {new PublicationChannelProxy("jornal")}); IScript script = null; List<IScript> scripts = new ArrayList<>(); scripts.add(script); IPosition pos = factory.position( code, openingDate, title, localizations, state, vacancies, closingDate, sla, person, company, tech, description, scripts, pub); application = factory.application(company, company, company, closingDate, person, pos); applicationEjb.save(application); }
@Ignore @Test public void shouldNotSaveInterviewsAtTheSameTime() { IInterview interview1 = factory.interview(new Date()); IInterview interview2 = factory.interview(new Date()); int size = ejb.findAllInterviews().size(); ejb.save(interview1); assertThat(ejb.findAllInterviews().size(), is(equalTo(size + 1))); }