target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void compoundFindDirtyReturnsNull() { Interceptor interceptor1 = mock(Interceptor.class); when(interceptor1.findDirty(null, null, null, null, null, null)).thenReturn(null); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor2.findDirty(null, null, null, null, null, null)).thenReturn(null);... | @Override public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { Set<Integer> result = new HashSet<Integer>(); boolean shouldReturnNull = true; for (Interceptor interceptor : interceptors) { int[] dirtyBits = interceptor .findDirty(e... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { Set<Integer> result = new HashSet<Integer>(); boolean shouldReturnNull = true; ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { Set<Integer> result = new HashSet<Integer>(); boolean shouldReturnNull = true; ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { Set<Integer> result = new HashSet<Integer>(); boolean shouldReturnNull = true; ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { Set<Integer> result = new HashSet<Integer>(); boolean shouldReturnNull = true; ... |
@Test public void compoundFindDirtyReturnsEmpty() { Interceptor interceptor1 = mock(Interceptor.class); when(interceptor1.findDirty(null, null, null, null, null, null)).thenReturn(null); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor2.findDirty(null, null, null, null, null, null)).thenReturn(new i... | @Override public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { Set<Integer> result = new HashSet<Integer>(); boolean shouldReturnNull = true; for (Interceptor interceptor : interceptors) { int[] dirtyBits = interceptor .findDirty(e... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { Set<Integer> result = new HashSet<Integer>(); boolean shouldReturnNull = true; ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { Set<Integer> result = new HashSet<Integer>(); boolean shouldReturnNull = true; ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { Set<Integer> result = new HashSet<Integer>(); boolean shouldReturnNull = true; ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { Set<Integer> result = new HashSet<Integer>(); boolean shouldReturnNull = true; ... |
@Test public void compoundFindDirtyReturnsUnion() { Interceptor interceptor1 = mock(Interceptor.class); when(interceptor1.findDirty(null, null, null, null, null, null)).thenReturn( new int[] {1, 2}); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor2.findDirty(null, null, null, null, null, null)).the... | @Override public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { Set<Integer> result = new HashSet<Integer>(); boolean shouldReturnNull = true; for (Interceptor interceptor : interceptors) { int[] dirtyBits = interceptor .findDirty(e... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { Set<Integer> result = new HashSet<Integer>(); boolean shouldReturnNull = true; ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { Set<Integer> result = new HashSet<Integer>(); boolean shouldReturnNull = true; ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { Set<Integer> result = new HashSet<Integer>(); boolean shouldReturnNull = true; ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) { Set<Integer> result = new HashSet<Integer>(); boolean shouldReturnNull = true; ... |
@Test public void afterTransactionCalledForEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); Interceptor compound = new CompoundHibernateInterceptor(interceptor1, interceptor2); compound.afterTransactionBegin(null); verify(interceptor1).afterTran... | @Override public void afterTransactionBegin(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.afterTransactionBegin(tx); } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void afterTransactionBegin(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.afterTransactionBegin(tx); } } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void afterTransactionBegin(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.afterTransactionBegin(tx); } } CompoundHibernateInterceptor(); CompoundHibernateInterceptor(Interceptor... in... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void afterTransactionBegin(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.afterTransactionBegin(tx); } } CompoundHibernateInterceptor(); CompoundHibernateInterceptor(Interceptor... in... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void afterTransactionBegin(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.afterTransactionBegin(tx); } } CompoundHibernateInterceptor(); CompoundHibernateInterceptor(Interceptor... in... |
@Test public void afterTransactionCompletionCalledForEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); Interceptor compound = new CompoundHibernateInterceptor(interceptor1, interceptor2); compound.afterTransactionCompletion(null); verify(intercep... | @Override public void afterTransactionCompletion(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.afterTransactionCompletion(tx); } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void afterTransactionCompletion(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.afterTransactionCompletion(tx); } } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void afterTransactionCompletion(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.afterTransactionCompletion(tx); } } CompoundHibernateInterceptor(); CompoundHibernateInterceptor(Interce... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void afterTransactionCompletion(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.afterTransactionCompletion(tx); } } CompoundHibernateInterceptor(); CompoundHibernateInterceptor(Interce... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void afterTransactionCompletion(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.afterTransactionCompletion(tx); } } CompoundHibernateInterceptor(); CompoundHibernateInterceptor(Interce... |
@Test public void afterTransactionCompletionCalledForEachInterceptorWithSameParameter() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); Transaction tx = mock(Transaction.class); Interceptor compound = new CompoundHibernateInterceptor(interceptor1, interceptor2);... | @Override public void afterTransactionCompletion(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.afterTransactionCompletion(tx); } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void afterTransactionCompletion(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.afterTransactionCompletion(tx); } } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void afterTransactionCompletion(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.afterTransactionCompletion(tx); } } CompoundHibernateInterceptor(); CompoundHibernateInterceptor(Interce... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void afterTransactionCompletion(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.afterTransactionCompletion(tx); } } CompoundHibernateInterceptor(); CompoundHibernateInterceptor(Interce... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void afterTransactionCompletion(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.afterTransactionCompletion(tx); } } CompoundHibernateInterceptor(); CompoundHibernateInterceptor(Interce... |
@Test public void beforeTransactionCompletionCalledForEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); Interceptor compound = new CompoundHibernateInterceptor(interceptor1, interceptor2); compound.beforeTransactionCompletion(null); verify(interc... | @Override public void beforeTransactionCompletion(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.beforeTransactionCompletion(tx); } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void beforeTransactionCompletion(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.beforeTransactionCompletion(tx); } } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void beforeTransactionCompletion(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.beforeTransactionCompletion(tx); } } CompoundHibernateInterceptor(); CompoundHibernateInterceptor(Inter... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void beforeTransactionCompletion(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.beforeTransactionCompletion(tx); } } CompoundHibernateInterceptor(); CompoundHibernateInterceptor(Inter... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void beforeTransactionCompletion(Transaction tx) { for (Interceptor interceptor : interceptors) { interceptor.beforeTransactionCompletion(tx); } } CompoundHibernateInterceptor(); CompoundHibernateInterceptor(Inter... |
@Test public void getEntityFallsThrough() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor1.getEntity(null, null)).thenReturn(null); when(interceptor2.getEntity(null, null)).thenReturn(null); Interceptor compound = new CompoundHibernateIntercepto... | @Override public Object getEntity(String entityName, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object tmp = interceptor.getEntity(entityName, id); if (tmp != null) { return tmp; } } return null; } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object getEntity(String entityName, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object tmp = interceptor.getEntity(entityName, id); if (tmp != null) { return tmp; } } ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object getEntity(String entityName, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object tmp = interceptor.getEntity(entityName, id); if (tmp != null) { return tmp; } } ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object getEntity(String entityName, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object tmp = interceptor.getEntity(entityName, id); if (tmp != null) { return tmp; } } ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object getEntity(String entityName, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object tmp = interceptor.getEntity(entityName, id); if (tmp != null) { return tmp; } } ... |
@Test public void getEntityReturnsFirstResult() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); Object entity1 = new Object(); when(interceptor1.getEntity(null, null)).thenReturn(entity1); when(interceptor2.getEntity(null, null)).thenReturn(null); Interceptor co... | @Override public Object getEntity(String entityName, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object tmp = interceptor.getEntity(entityName, id); if (tmp != null) { return tmp; } } return null; } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object getEntity(String entityName, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object tmp = interceptor.getEntity(entityName, id); if (tmp != null) { return tmp; } } ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object getEntity(String entityName, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object tmp = interceptor.getEntity(entityName, id); if (tmp != null) { return tmp; } } ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object getEntity(String entityName, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object tmp = interceptor.getEntity(entityName, id); if (tmp != null) { return tmp; } } ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object getEntity(String entityName, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object tmp = interceptor.getEntity(entityName, id); if (tmp != null) { return tmp; } } ... |
@Test public void getEntityReturnsFirstResultAfterNullResults() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); Object entity = new Object(); when(interceptor1.getEntity(null, null)).thenReturn(null); when(interceptor2.getEntity(null, null)).thenReturn(entity); ... | @Override public Object getEntity(String entityName, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object tmp = interceptor.getEntity(entityName, id); if (tmp != null) { return tmp; } } return null; } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object getEntity(String entityName, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object tmp = interceptor.getEntity(entityName, id); if (tmp != null) { return tmp; } } ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object getEntity(String entityName, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object tmp = interceptor.getEntity(entityName, id); if (tmp != null) { return tmp; } } ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object getEntity(String entityName, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object tmp = interceptor.getEntity(entityName, id); if (tmp != null) { return tmp; } } ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object getEntity(String entityName, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object tmp = interceptor.getEntity(entityName, id); if (tmp != null) { return tmp; } } ... |
@Test public void deelnemerMetAfgedrukteVerbintenisInScope() { Deelnemer deelnemer = maakDeelnemerMetVerbintenis(Afgedrukt); assertTrue(model.isInBronScope(deelnemer)); } | public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.getPersoon())) retu... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... |
@Test public void getEntityNameFallsThrough() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor1.getEntityName(null)).thenReturn(null); when(interceptor2.getEntityName(null)).thenReturn(null); Interceptor compound = new CompoundHibernateIntercepto... | @Override public String getEntityName(Object object) throws CallbackException { for (Interceptor interceptor : interceptors) { String name = interceptor.getEntityName(object); if (name != null) { return name; } } return null; } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String getEntityName(Object object) throws CallbackException { for (Interceptor interceptor : interceptors) { String name = interceptor.getEntityName(object); if (name != null) { return name; } } return null; } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String getEntityName(Object object) throws CallbackException { for (Interceptor interceptor : interceptors) { String name = interceptor.getEntityName(object); if (name != null) { return name; } } return null; } Com... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String getEntityName(Object object) throws CallbackException { for (Interceptor interceptor : interceptors) { String name = interceptor.getEntityName(object); if (name != null) { return name; } } return null; } Com... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String getEntityName(Object object) throws CallbackException { for (Interceptor interceptor : interceptors) { String name = interceptor.getEntityName(object); if (name != null) { return name; } } return null; } Com... |
@Test public void getEntityNameReturnsFirstResult() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); String name = "name"; when(interceptor1.getEntityName(null)).thenReturn(name); when(interceptor2.getEntityName(null)).thenReturn(null); Interceptor compound = new... | @Override public String getEntityName(Object object) throws CallbackException { for (Interceptor interceptor : interceptors) { String name = interceptor.getEntityName(object); if (name != null) { return name; } } return null; } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String getEntityName(Object object) throws CallbackException { for (Interceptor interceptor : interceptors) { String name = interceptor.getEntityName(object); if (name != null) { return name; } } return null; } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String getEntityName(Object object) throws CallbackException { for (Interceptor interceptor : interceptors) { String name = interceptor.getEntityName(object); if (name != null) { return name; } } return null; } Com... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String getEntityName(Object object) throws CallbackException { for (Interceptor interceptor : interceptors) { String name = interceptor.getEntityName(object); if (name != null) { return name; } } return null; } Com... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String getEntityName(Object object) throws CallbackException { for (Interceptor interceptor : interceptors) { String name = interceptor.getEntityName(object); if (name != null) { return name; } } return null; } Com... |
@Test public void getEntityNameReturnsFirstResultAfterNullResults() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); String name = "name"; when(interceptor1.getEntityName(null)).thenReturn(null); when(interceptor2.getEntityName(null)).thenReturn(name); Intercepto... | @Override public String getEntityName(Object object) throws CallbackException { for (Interceptor interceptor : interceptors) { String name = interceptor.getEntityName(object); if (name != null) { return name; } } return null; } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String getEntityName(Object object) throws CallbackException { for (Interceptor interceptor : interceptors) { String name = interceptor.getEntityName(object); if (name != null) { return name; } } return null; } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String getEntityName(Object object) throws CallbackException { for (Interceptor interceptor : interceptors) { String name = interceptor.getEntityName(object); if (name != null) { return name; } } return null; } Com... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String getEntityName(Object object) throws CallbackException { for (Interceptor interceptor : interceptors) { String name = interceptor.getEntityName(object); if (name != null) { return name; } } return null; } Com... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String getEntityName(Object object) throws CallbackException { for (Interceptor interceptor : interceptors) { String name = interceptor.getEntityName(object); if (name != null) { return name; } } return null; } Com... |
@Test public void instantiateFallsThrough() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor1.instantiate(null, null, null)).thenReturn(null); when(interceptor2.instantiate(null, null, null)).thenReturn(null); Interceptor compound = new CompoundH... | @Override public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object entity = interceptor.instantiate(entityName, entityMode, id); if (entity != null) { return entity; } } return null; } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object entity = interceptor.instantiate(entityName, entityMode... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object entity = interceptor.instantiate(entityName, entityMode... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object entity = interceptor.instantiate(entityName, entityMode... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object entity = interceptor.instantiate(entityName, entityMode... |
@Test public void instantiateReturnsFirstResult() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); Object entity = new Object(); when(interceptor1.instantiate(null, null, null)).thenReturn(entity); when(interceptor2.instantiate(null, null, null)).thenReturn(null)... | @Override public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object entity = interceptor.instantiate(entityName, entityMode, id); if (entity != null) { return entity; } } return null; } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object entity = interceptor.instantiate(entityName, entityMode... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object entity = interceptor.instantiate(entityName, entityMode... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object entity = interceptor.instantiate(entityName, entityMode... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object entity = interceptor.instantiate(entityName, entityMode... |
@Test public void instantiateReturnsFirstResultAfterNullResults() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); Object entity = new Object(); when(interceptor1.instantiate(null, null, null)).thenReturn(null); when(interceptor2.instantiate(null, null, null)).th... | @Override public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object entity = interceptor.instantiate(entityName, entityMode, id); if (entity != null) { return entity; } } return null; } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object entity = interceptor.instantiate(entityName, entityMode... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object entity = interceptor.instantiate(entityName, entityMode... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object entity = interceptor.instantiate(entityName, entityMode... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { for (Interceptor interceptor : interceptors) { Object entity = interceptor.instantiate(entityName, entityMode... |
@Test public void isTransientFallsThrough() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor1.isTransient(null)).thenReturn(null); when(interceptor2.isTransient(null)).thenReturn(null); Interceptor compound = new CompoundHibernateInterceptor(inte... | @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } return null; } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... |
@Test public void isTransientReturnsFirstResultWithFalse() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor1.isTransient(null)).thenReturn(false); when(interceptor2.isTransient(null)).thenReturn(null); Interceptor compound = new CompoundHibernate... | @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } return null; } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... |
@Test public void isTransientReturnsFirstResultWithTrue() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor1.isTransient(null)).thenReturn(true); when(interceptor2.isTransient(null)).thenReturn(null); Interceptor compound = new CompoundHibernateIn... | @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } return null; } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... |
@Test public void isTransientReturnsFirstResultAfterNullResultsCaseTrue() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor1.isTransient(null)).thenReturn(null); when(interceptor2.isTransient(null)).thenReturn(true); Interceptor compound = new Com... | @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } return null; } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... |
@Test public void deelnemerMetDefinitieveVerbintenisInScope() { Deelnemer deelnemer = maakDeelnemerMetVerbintenis(Definitief); assertTrue(model.isInBronScope(deelnemer)); } | public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.getPersoon())) retu... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... |
@Test public void isTransientReturnsFirstResultAfterNullResultsCaseFalse() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor1.isTransient(null)).thenReturn(null); when(interceptor2.isTransient(null)).thenReturn(false); Interceptor compound = new C... | @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } return null; } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public Boolean isTransient(Object entity) { Boolean isTransient = null; for (Interceptor interceptor : interceptors) { isTransient = interceptor.isTransient(entity); if (isTransient != null) { return isTransient; } } retu... |
@Test public void onCollectionRecreateCalledForEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); Interceptor compound = new CompoundHibernateInterceptor(interceptor1, interceptor2); compound.onCollectionRecreate(null, null); verify(interceptor1).... | @Override public void onCollectionRecreate(Object collection, Serializable key) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onCollectionRecreate(collection, key); } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onCollectionRecreate(Object collection, Serializable key) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onCollectionRecreate(collection, key); } } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onCollectionRecreate(Object collection, Serializable key) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onCollectionRecreate(collection, key); } } CompoundHibernateInter... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onCollectionRecreate(Object collection, Serializable key) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onCollectionRecreate(collection, key); } } CompoundHibernateInter... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onCollectionRecreate(Object collection, Serializable key) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onCollectionRecreate(collection, key); } } CompoundHibernateInter... |
@Test public void onCollectionRemoveCalledForEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); Interceptor compound = new CompoundHibernateInterceptor(interceptor1, interceptor2); compound.onCollectionRemove(null, null); verify(interceptor1).onCo... | @Override public void onCollectionRemove(Object collection, Serializable key) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onCollectionRemove(collection, key); } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onCollectionRemove(Object collection, Serializable key) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onCollectionRemove(collection, key); } } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onCollectionRemove(Object collection, Serializable key) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onCollectionRemove(collection, key); } } CompoundHibernateIntercept... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onCollectionRemove(Object collection, Serializable key) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onCollectionRemove(collection, key); } } CompoundHibernateIntercept... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onCollectionRemove(Object collection, Serializable key) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onCollectionRemove(collection, key); } } CompoundHibernateIntercept... |
@Test public void onCollectionUpdateCalledForEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); Interceptor compound = new CompoundHibernateInterceptor(interceptor1, interceptor2); compound.onCollectionUpdate(null, null); verify(interceptor1).onCo... | @Override public void onCollectionUpdate(Object collection, Serializable key) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onCollectionUpdate(collection, key); } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onCollectionUpdate(Object collection, Serializable key) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onCollectionUpdate(collection, key); } } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onCollectionUpdate(Object collection, Serializable key) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onCollectionUpdate(collection, key); } } CompoundHibernateIntercept... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onCollectionUpdate(Object collection, Serializable key) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onCollectionUpdate(collection, key); } } CompoundHibernateIntercept... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onCollectionUpdate(Object collection, Serializable key) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onCollectionUpdate(collection, key); } } CompoundHibernateIntercept... |
@Test public void onDeleteCalledForEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); Interceptor compound = new CompoundHibernateInterceptor(interceptor1, interceptor2); compound.onDelete(null, null, null, null, null); verify(interceptor1).onDele... | @Override public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onDelete(entity, id, state, propertyNames, types); } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onDelete(entity, id, state, ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onDelete(entity, id, state, ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onDelete(entity, id, state, ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.onDelete(entity, id, state, ... |
@Test public void onFlushDirtyCalledForEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor1.onFlushDirty(null, null, null, null, null, null)).thenReturn(false); when(interceptor2.onFlushDirty(null, null, null, null, null, null)).th... | @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityModified = interceptor.onFlushDirty(entity, id, curre... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... |
@Test public void onFlushDirtyUnionOfEachInterceptor1() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor1.onFlushDirty(null, null, null, null, null, null)).thenReturn(false); when(interceptor2.onFlushDirty(null, null, null, null, null, null)).the... | @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityModified = interceptor.onFlushDirty(entity, id, curre... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... |
@Test public void onFlushDirtyUnionOfEachInterceptor2() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor1.onFlushDirty(null, null, null, null, null, null)).thenReturn(true); when(interceptor2.onFlushDirty(null, null, null, null, null, null)).then... | @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityModified = interceptor.onFlushDirty(entity, id, curre... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... |
@Test public void onFlushDirtyUnionOfEachInterceptor3() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor1.onFlushDirty(null, null, null, null, null, null)).thenReturn(true); when(interceptor2.onFlushDirty(null, null, null, null, null, null)).then... | @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityModified = interceptor.onFlushDirty(entity, id, curre... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor ... |
@Test public void onLoadCalledForEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); when(interceptor1.onLoad(null, null, null, null, null)).thenReturn(true); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor2.onLoad(null, null, null, null, null)).thenReturn(true); Interceptor com... | @Override public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityModified = interceptor.onLoad(entity, id, state, propertyNames, types) || entityModified; ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... |
@Test public void deelnemerMetAfgemeldeVerbintenisNietInScope() { Deelnemer deelnemer = maakDeelnemerMetVerbintenis(Afgemeld); assertFalse(model.isInBronScope(deelnemer)); } | public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.getPersoon())) retu... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... |
@Test public void onLoadRecordsChangeAndCallsEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); when(interceptor1.onLoad(null, null, null, null, null)).thenReturn(true); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor2.onLoad(null, null, null, null, null)).thenReturn(false); In... | @Override public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityModified = interceptor.onLoad(entity, id, state, propertyNames, types) || entityModified; ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... |
@Test public void onLoadRecordsNoChangeAndCallsEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); when(interceptor1.onLoad(null, null, null, null, null)).thenReturn(false); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor2.onLoad(null, null, null, null, null)).thenReturn(false);... | @Override public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityModified = interceptor.onLoad(entity, id, state, propertyNames, types) || entityModified; ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... |
@Test public void onPrepareStatementCalledForEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); String sql0 = "select * from dual"; String sql1 = "select * from dual1"; String sql2 = "select * from dual12"; when(interceptor1.onPrepareStatement(sql... | @Override public String onPrepareStatement(String sql) { String result = sql; for (Interceptor interceptor : interceptors) { result = interceptor.onPrepareStatement(result); } return result; } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String onPrepareStatement(String sql) { String result = sql; for (Interceptor interceptor : interceptors) { result = interceptor.onPrepareStatement(result); } return result; } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String onPrepareStatement(String sql) { String result = sql; for (Interceptor interceptor : interceptors) { result = interceptor.onPrepareStatement(result); } return result; } CompoundHibernateInterceptor(); Compo... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String onPrepareStatement(String sql) { String result = sql; for (Interceptor interceptor : interceptors) { result = interceptor.onPrepareStatement(result); } return result; } CompoundHibernateInterceptor(); Compo... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public String onPrepareStatement(String sql) { String result = sql; for (Interceptor interceptor : interceptors) { result = interceptor.onPrepareStatement(result); } return result; } CompoundHibernateInterceptor(); Compo... |
@Test public void onSaveRecordsChangeAndCallsEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); when(interceptor1.onSave(null, null, null, null, null)).thenReturn(true); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor2.onSave(null, null, null, null, null)).thenReturn(false); In... | @Override public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityModified = interceptor.onSave(entity, id, state, propertyNames, types) || entityModified; ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... |
@Test public void onSaveRecordsNoChangeAndCallsEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); when(interceptor1.onSave(null, null, null, null, null)).thenReturn(false); Interceptor interceptor2 = mock(Interceptor.class); when(interceptor2.onSave(null, null, null, null, null)).thenReturn(false);... | @Override public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityModified = interceptor.onSave(entity, id, state, propertyNames, types) || entityModified; ... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @Override public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { boolean entityModified = false; for (Interceptor interceptor : interceptors) { entityM... |
@Test public void postFlushCalledForEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); Interceptor compound = new CompoundHibernateInterceptor(interceptor1, interceptor2); compound.postFlush(null); verify(interceptor1).postFlush(null); verify(inte... | @SuppressWarnings("unchecked") @Override public void postFlush(Iterator entities) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.postFlush(entities); } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @SuppressWarnings("unchecked") @Override public void postFlush(Iterator entities) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.postFlush(entities); } } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @SuppressWarnings("unchecked") @Override public void postFlush(Iterator entities) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.postFlush(entities); } } CompoundHibernateInterceptor(); Compo... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @SuppressWarnings("unchecked") @Override public void postFlush(Iterator entities) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.postFlush(entities); } } CompoundHibernateInterceptor(); Compo... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @SuppressWarnings("unchecked") @Override public void postFlush(Iterator entities) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.postFlush(entities); } } CompoundHibernateInterceptor(); Compo... |
@Test public void preFlushCalledForEachInterceptor() { Interceptor interceptor1 = mock(Interceptor.class); Interceptor interceptor2 = mock(Interceptor.class); Interceptor compound = new CompoundHibernateInterceptor(interceptor1, interceptor2); compound.preFlush(null); verify(interceptor1).preFlush(null); verify(interce... | @SuppressWarnings("unchecked") @Override public void preFlush(Iterator entities) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.preFlush(entities); } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @SuppressWarnings("unchecked") @Override public void preFlush(Iterator entities) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.preFlush(entities); } } } | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @SuppressWarnings("unchecked") @Override public void preFlush(Iterator entities) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.preFlush(entities); } } CompoundHibernateInterceptor(); Compoun... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @SuppressWarnings("unchecked") @Override public void preFlush(Iterator entities) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.preFlush(entities); } } CompoundHibernateInterceptor(); Compoun... | CompoundHibernateInterceptor extends EmptyInterceptor implements Iterable<Interceptor> { @SuppressWarnings("unchecked") @Override public void preFlush(Iterator entities) throws CallbackException { for (Interceptor interceptor : interceptors) { interceptor.preFlush(entities); } } CompoundHibernateInterceptor(); Compoun... |
@Test(expected = UnsupportedOperationException.class) public void openSessionWithInterceptorFails() { SessionFactory mockSessionFactory = mock(SessionFactory.class); Interceptor mockInterceptor = mock(Interceptor.class); InterceptingSessionFactory factory = new InterceptingSessionFactory(mockSessionFactory); factory.op... | public Session openSession() throws HibernateException { if (!interceptorFactories.isEmpty()) { return interceptedSession(null); } return sessionFactory.openSession(); } | InterceptingSessionFactory implements SessionFactory, InterceptorFactoryAware,
HibernateSessionFactoryAware { public Session openSession() throws HibernateException { if (!interceptorFactories.isEmpty()) { return interceptedSession(null); } return sessionFactory.openSession(); } } | InterceptingSessionFactory implements SessionFactory, InterceptorFactoryAware,
HibernateSessionFactoryAware { public Session openSession() throws HibernateException { if (!interceptorFactories.isEmpty()) { return interceptedSession(null); } return sessionFactory.openSession(); } InterceptingSessionFactory(SessionFact... | InterceptingSessionFactory implements SessionFactory, InterceptorFactoryAware,
HibernateSessionFactoryAware { public Session openSession() throws HibernateException { if (!interceptorFactories.isEmpty()) { return interceptedSession(null); } return sessionFactory.openSession(); } InterceptingSessionFactory(SessionFact... | InterceptingSessionFactory implements SessionFactory, InterceptorFactoryAware,
HibernateSessionFactoryAware { public Session openSession() throws HibernateException { if (!interceptorFactories.isEmpty()) { return interceptedSession(null); } return sessionFactory.openSession(); } InterceptingSessionFactory(SessionFact... |
@Test(expected = UnsupportedOperationException.class) public void openSessionWithConnectionAndInterceptorFails() { SessionFactory mockSessionFactory = mock(SessionFactory.class); Interceptor mockInterceptor = mock(Interceptor.class); Connection mockConnection = mock(Connection.class); InterceptingSessionFactory factory... | public Session openSession() throws HibernateException { if (!interceptorFactories.isEmpty()) { return interceptedSession(null); } return sessionFactory.openSession(); } | InterceptingSessionFactory implements SessionFactory, InterceptorFactoryAware,
HibernateSessionFactoryAware { public Session openSession() throws HibernateException { if (!interceptorFactories.isEmpty()) { return interceptedSession(null); } return sessionFactory.openSession(); } } | InterceptingSessionFactory implements SessionFactory, InterceptorFactoryAware,
HibernateSessionFactoryAware { public Session openSession() throws HibernateException { if (!interceptorFactories.isEmpty()) { return interceptedSession(null); } return sessionFactory.openSession(); } InterceptingSessionFactory(SessionFact... | InterceptingSessionFactory implements SessionFactory, InterceptorFactoryAware,
HibernateSessionFactoryAware { public Session openSession() throws HibernateException { if (!interceptorFactories.isEmpty()) { return interceptedSession(null); } return sessionFactory.openSession(); } InterceptingSessionFactory(SessionFact... | InterceptingSessionFactory implements SessionFactory, InterceptorFactoryAware,
HibernateSessionFactoryAware { public Session openSession() throws HibernateException { if (!interceptorFactories.isEmpty()) { return interceptedSession(null); } return sessionFactory.openSession(); } InterceptingSessionFactory(SessionFact... |
@Test public void deelnemerMetAfgewezenVerbintenisNietInScope() { Deelnemer deelnemer = maakDeelnemerMetVerbintenis(Afgewezen); assertFalse(model.isInBronScope(deelnemer)); } | public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.getPersoon())) retu... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... |
@Test public void huisnummer9() { Deelnemer deelnemer = createDeelnemerMetPersoon(); Adres adres = deelnemer.getPersoon().getFysiekAdres().getAdres(); adres.setHuisnummer("9"); assertThat(model.getHuisnummer(deelnemer), is(9)); } | public Integer getHuisnummer(Deelnemer deelnemer) { if (!woontInNederland(deelnemer)) { return null; } return getHuisnummer(getWoonadres(deelnemer)); } | BronEduArteModel { public Integer getHuisnummer(Deelnemer deelnemer) { if (!woontInNederland(deelnemer)) { return null; } return getHuisnummer(getWoonadres(deelnemer)); } } | BronEduArteModel { public Integer getHuisnummer(Deelnemer deelnemer) { if (!woontInNederland(deelnemer)) { return null; } return getHuisnummer(getWoonadres(deelnemer)); } } | BronEduArteModel { public Integer getHuisnummer(Deelnemer deelnemer) { if (!woontInNederland(deelnemer)) { return null; } return getHuisnummer(getWoonadres(deelnemer)); } Collection<Verbintenis> getVerbintenissen(Object entity); boolean isInBronScope(Adres adres); boolean isInBronScope(Persoon persoon); boolean isInBr... | BronEduArteModel { public Integer getHuisnummer(Deelnemer deelnemer) { if (!woontInNederland(deelnemer)) { return null; } return getHuisnummer(getWoonadres(deelnemer)); } Collection<Verbintenis> getVerbintenissen(Object entity); boolean isInBronScope(Adres adres); boolean isInBronScope(Persoon persoon); boolean isInBr... |
@Test public void huisnummerToevoeging9() { Deelnemer deelnemer = createDeelnemerMetPersoon(); Adres adres = deelnemer.getPersoon().getFysiekAdres().getAdres(); adres.setHuisnummer("9"); assertThat(model.getHuisnummerToevoeging(deelnemer), nullValue()); } | public String getHuisnummerToevoeging(Deelnemer deelnemer) { if (!woontInNederland(deelnemer)) { return null; } String toevoeging = getWoonadres(deelnemer).getHuisnummerToevoeging(); if (StringUtil.isEmpty(toevoeging)) { return null; } return toevoeging.trim(); } | BronEduArteModel { public String getHuisnummerToevoeging(Deelnemer deelnemer) { if (!woontInNederland(deelnemer)) { return null; } String toevoeging = getWoonadres(deelnemer).getHuisnummerToevoeging(); if (StringUtil.isEmpty(toevoeging)) { return null; } return toevoeging.trim(); } } | BronEduArteModel { public String getHuisnummerToevoeging(Deelnemer deelnemer) { if (!woontInNederland(deelnemer)) { return null; } String toevoeging = getWoonadres(deelnemer).getHuisnummerToevoeging(); if (StringUtil.isEmpty(toevoeging)) { return null; } return toevoeging.trim(); } } | BronEduArteModel { public String getHuisnummerToevoeging(Deelnemer deelnemer) { if (!woontInNederland(deelnemer)) { return null; } String toevoeging = getWoonadres(deelnemer).getHuisnummerToevoeging(); if (StringUtil.isEmpty(toevoeging)) { return null; } return toevoeging.trim(); } Collection<Verbintenis> getVerbinten... | BronEduArteModel { public String getHuisnummerToevoeging(Deelnemer deelnemer) { if (!woontInNederland(deelnemer)) { return null; } String toevoeging = getWoonadres(deelnemer).getHuisnummerToevoeging(); if (StringUtil.isEmpty(toevoeging)) { return null; } return toevoeging.trim(); } Collection<Verbintenis> getVerbinten... |
@Test public void nieuweWaarde() { BronStateChange change = new BronStateChange(new Deelnemer(), "naam", null, "Alexander"); assertThat(change.toString(), is("Deelnemer.naam: -> Alexander")); } | @Override public String toString() { return entity.getClass().getSimpleName() + "." + propertyName + ": " + toString(previousValue) + " -> " + toString(currentValue); } | BronStateChange implements Serializable { @Override public String toString() { return entity.getClass().getSimpleName() + "." + propertyName + ": " + toString(previousValue) + " -> " + toString(currentValue); } } | BronStateChange implements Serializable { @Override public String toString() { return entity.getClass().getSimpleName() + "." + propertyName + ": " + toString(previousValue) + " -> " + toString(currentValue); } BronStateChange(IdObject entity, String propertyName, Object previousValue,
Object currentValue); } | BronStateChange implements Serializable { @Override public String toString() { return entity.getClass().getSimpleName() + "." + propertyName + ": " + toString(previousValue) + " -> " + toString(currentValue); } BronStateChange(IdObject entity, String propertyName, Object previousValue,
Object currentValue); boolean ... | BronStateChange implements Serializable { @Override public String toString() { return entity.getClass().getSimpleName() + "." + propertyName + ": " + toString(previousValue) + " -> " + toString(currentValue); } BronStateChange(IdObject entity, String propertyName, Object previousValue,
Object currentValue); boolean ... |
@Test public void datumWaarde() { Persoon persoon = new Persoon(); persoon.setId(12345L); BronStateChange change = new BronStateChange(persoon, "geboorteDatum", TimeUtil.getInstance().parseDateString( "2009-01-01"), null); assertThat(change.toString(), is("Persoon.geboorteDatum: 2009-01-01 -> ")); } | @Override public String toString() { return entity.getClass().getSimpleName() + "." + propertyName + ": " + toString(previousValue) + " -> " + toString(currentValue); } | BronStateChange implements Serializable { @Override public String toString() { return entity.getClass().getSimpleName() + "." + propertyName + ": " + toString(previousValue) + " -> " + toString(currentValue); } } | BronStateChange implements Serializable { @Override public String toString() { return entity.getClass().getSimpleName() + "." + propertyName + ": " + toString(previousValue) + " -> " + toString(currentValue); } BronStateChange(IdObject entity, String propertyName, Object previousValue,
Object currentValue); } | BronStateChange implements Serializable { @Override public String toString() { return entity.getClass().getSimpleName() + "." + propertyName + ": " + toString(previousValue) + " -> " + toString(currentValue); } BronStateChange(IdObject entity, String propertyName, Object previousValue,
Object currentValue); boolean ... | BronStateChange implements Serializable { @Override public String toString() { return entity.getClass().getSimpleName() + "." + propertyName + ": " + toString(previousValue) + " -> " + toString(currentValue); } BronStateChange(IdObject entity, String propertyName, Object previousValue,
Object currentValue); boolean ... |
@Test public void controleerPersoonProperties() { Persoon persoon = new Persoon(); assertTrue(watches.isWatched(persoon)); assertTrue(watches.isWatched(persoon, "bsn")); assertTrue(watches.isWatched(persoon, "officieleAchternaam")); assertFalse(watches.isWatched(persoon, "id")); } | public boolean isWatched(Entiteit entity) { return list.containsKey(Hibernate.getClass(entity)); } | BronWatchList { public boolean isWatched(Entiteit entity) { return list.containsKey(Hibernate.getClass(entity)); } } | BronWatchList { public boolean isWatched(Entiteit entity) { return list.containsKey(Hibernate.getClass(entity)); } } | BronWatchList { public boolean isWatched(Entiteit entity) { return list.containsKey(Hibernate.getClass(entity)); } boolean isWatched(Entiteit entity); boolean isWatched(Entiteit entiteit, String property); static boolean isSleutelWaarde(Entiteit entiteit, String expression); static boolean isSleutelWaarde(IdObject ent... | BronWatchList { public boolean isWatched(Entiteit entity) { return list.containsKey(Hibernate.getClass(entity)); } boolean isWatched(Entiteit entity); boolean isWatched(Entiteit entiteit, String property); static boolean isSleutelWaarde(Entiteit entiteit, String expression); static boolean isSleutelWaarde(IdObject ent... |
@Test public void registratieDatumIsSysteemDatum() { Date date = TimeUtil.getInstance().currentDate(); IntakeWizardModel model = new IntakeWizardModel(); Assert.assertEquals(date, model.getRegistratieDatum()); } | public Date getRegistratieDatum() { return registratieDatum; } | IntakeWizardModel implements IModel<IntakeWizardModel> { public Date getRegistratieDatum() { return registratieDatum; } } | IntakeWizardModel implements IModel<IntakeWizardModel> { public Date getRegistratieDatum() { return registratieDatum; } IntakeWizardModel(); IntakeWizardModel(Medewerker medewerker); IntakeWizardModel(Deelnemer deelnemer, Medewerker medewerker); } | IntakeWizardModel implements IModel<IntakeWizardModel> { public Date getRegistratieDatum() { return registratieDatum; } IntakeWizardModel(); IntakeWizardModel(Medewerker medewerker); IntakeWizardModel(Deelnemer deelnemer, Medewerker medewerker); Intakegesprek createDefaultIntakegesprek(Verbintenis verbintenis); void ... | IntakeWizardModel implements IModel<IntakeWizardModel> { public Date getRegistratieDatum() { return registratieDatum; } IntakeWizardModel(); IntakeWizardModel(Medewerker medewerker); IntakeWizardModel(Deelnemer deelnemer, Medewerker medewerker); Intakegesprek createDefaultIntakegesprek(Verbintenis verbintenis); void ... |
@Test public void woonAdresIsPostAdresStandaardGezet() { IntakeWizardModel model = new IntakeWizardModel(); Assert.assertEquals(1, model.getDeelnemer().getPersoon().getFysiekAdressen().size()); Assert.assertEquals(1, model.getDeelnemer().getPersoon().getPostAdressen().size()); } | public Deelnemer getDeelnemer() { return deelnemerModel.getObject(); } | IntakeWizardModel implements IModel<IntakeWizardModel> { public Deelnemer getDeelnemer() { return deelnemerModel.getObject(); } } | IntakeWizardModel implements IModel<IntakeWizardModel> { public Deelnemer getDeelnemer() { return deelnemerModel.getObject(); } IntakeWizardModel(); IntakeWizardModel(Medewerker medewerker); IntakeWizardModel(Deelnemer deelnemer, Medewerker medewerker); } | IntakeWizardModel implements IModel<IntakeWizardModel> { public Deelnemer getDeelnemer() { return deelnemerModel.getObject(); } IntakeWizardModel(); IntakeWizardModel(Medewerker medewerker); IntakeWizardModel(Deelnemer deelnemer, Medewerker medewerker); Intakegesprek createDefaultIntakegesprek(Verbintenis verbintenis... | IntakeWizardModel implements IModel<IntakeWizardModel> { public Deelnemer getDeelnemer() { return deelnemerModel.getObject(); } IntakeWizardModel(); IntakeWizardModel(Medewerker medewerker); IntakeWizardModel(Deelnemer deelnemer, Medewerker medewerker); Intakegesprek createDefaultIntakegesprek(Verbintenis verbintenis... |
@Test public void filterLegeLijst() { List<PersoonAdres> lijst = new ArrayList<PersoonAdres>(); Assert.assertEquals(Collections.emptyList(), getElementenOpPeildatum(lijst, vandaag)); } | public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } } | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } } | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } static boolean isActief(IBeginEin... | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } static boolean isActief(IBeginEin... |
@Test public void filterNaarLeegResultaat() { List<PersoonAdres> lijst = new ArrayList<PersoonAdres>(); adres.setBegindatum(morgen); lijst.add(adres); Assert.assertEquals(Collections.emptyList(), getElementenOpPeildatum(lijst, vandaag)); Assert.assertEquals(Collections.emptyList(), getElementenOpPeildatum(lijst, gister... | public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } } | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } } | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } static boolean isActief(IBeginEin... | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } static boolean isActief(IBeginEin... |
@Test public void filterNaarGevuldResultaat() { adres.setBegindatum(gisteren); List<PersoonAdres> lijst = Arrays.asList(adres); Assert.assertEquals(Arrays.asList(adres), getElementenOpPeildatum(lijst, vandaag)); Assert.assertEquals(Arrays.asList(adres), getElementenOpPeildatum(lijst, morgen)); } | public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } } | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } } | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } static boolean isActief(IBeginEin... | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } static boolean isActief(IBeginEin... |
@Test public void verlopenInterval() { adres.setBegindatum(gisteren); adres.setEinddatum(vandaag); List<PersoonAdres> lijst = Arrays.asList(adres); Assert.assertEquals(Collections.emptyList(), getElementenOpPeildatum(lijst, eergisteren)); Assert.assertEquals(Arrays.asList(adres), getElementenOpPeildatum(lijst, vandaag)... | public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } } | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } } | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } static boolean isActief(IBeginEin... | BeginEinddatumUtil { public static <T extends IBeginEinddatumEntiteit> List<T> getElementenOpPeildatum( List<T> lijst, Date peildatum) { List<T> resultaat = new ArrayList<T>(); for (T element : lijst) { if (element.isActief(peildatum)) { resultaat.add(element); } } return resultaat; } static boolean isActief(IBeginEin... |
@Test public void applicatienaamWordtVerwijderdVanSerienummer() { assertThat(token.getSerienummer(), is("123456789")); } | public String getSerienummer() { return serienummer; } | Token extends InstellingEntiteit { public String getSerienummer() { return serienummer; } } | Token extends InstellingEntiteit { public String getSerienummer() { return serienummer; } Token(String serienummer, String applicatie, String blob); protected Token(); } | Token extends InstellingEntiteit { public String getSerienummer() { return serienummer; } Token(String serienummer, String applicatie, String blob); protected Token(); boolean verifieerPassword(String password); @SuppressWarnings("hiding") void geefUit(Account gebruiker); void neemIn(); void meldDefect(); void reparee... | Token extends InstellingEntiteit { public String getSerienummer() { return serienummer; } Token(String serienummer, String applicatie, String blob); protected Token(); boolean verifieerPassword(String password); @SuppressWarnings("hiding") void geefUit(Account gebruiker); void neemIn(); void meldDefect(); void reparee... |
@Test public void serienummerZonderapplicatienaamBlijftSerienummer() { assertThat(token.getSerienummer(), is("123456789")); } | public String getSerienummer() { return serienummer; } | Token extends InstellingEntiteit { public String getSerienummer() { return serienummer; } } | Token extends InstellingEntiteit { public String getSerienummer() { return serienummer; } Token(String serienummer, String applicatie, String blob); protected Token(); } | Token extends InstellingEntiteit { public String getSerienummer() { return serienummer; } Token(String serienummer, String applicatie, String blob); protected Token(); boolean verifieerPassword(String password); @SuppressWarnings("hiding") void geefUit(Account gebruiker); void neemIn(); void meldDefect(); void reparee... | Token extends InstellingEntiteit { public String getSerienummer() { return serienummer; } Token(String serienummer, String applicatie, String blob); protected Token(); boolean verifieerPassword(String password); @SuppressWarnings("hiding") void geefUit(Account gebruiker); void neemIn(); void meldDefect(); void reparee... |
@Test public void standaardStatusIsBeschikbaar() { assertThat(token.getStatus(), is(Beschikbaar)); } | public TokenStatus getStatus() { return status; } | Token extends InstellingEntiteit { public TokenStatus getStatus() { return status; } } | Token extends InstellingEntiteit { public TokenStatus getStatus() { return status; } Token(String serienummer, String applicatie, String blob); protected Token(); } | Token extends InstellingEntiteit { public TokenStatus getStatus() { return status; } Token(String serienummer, String applicatie, String blob); protected Token(); boolean verifieerPassword(String password); @SuppressWarnings("hiding") void geefUit(Account gebruiker); void neemIn(); void meldDefect(); void repareer(); ... | Token extends InstellingEntiteit { public TokenStatus getStatus() { return status; } Token(String serienummer, String applicatie, String blob); protected Token(); boolean verifieerPassword(String password); @SuppressWarnings("hiding") void geefUit(Account gebruiker); void neemIn(); void meldDefect(); void repareer(); ... |
@Test public void testParseHuisnummer() { assertThat(Adres.parseHuisnummerToevoeging("100"), is(new String[] {"100", ""})); assertThat(Adres.parseHuisnummerToevoeging("100A"), is(new String[] {"100", "A"})); assertThat(Adres.parseHuisnummerToevoeging("100 A"), is(new String[] {"100", "A"})); assertThat(Adres.parseHuisn... | public static String[] parseHuisnummerToevoeging(String text) { Pattern pattern = Pattern.compile("([0-9]+)(.*)"); Matcher matcher = pattern.matcher(text); if (!matcher.find()) { return StringUtils.stripAll(new String[] {text, ""}); } else { return StringUtils.stripAll(new String[] {matcher.group(1), matcher.group(2)})... | Adres extends LandelijkOfInstellingEntiteit { public static String[] parseHuisnummerToevoeging(String text) { Pattern pattern = Pattern.compile("([0-9]+)(.*)"); Matcher matcher = pattern.matcher(text); if (!matcher.find()) { return StringUtils.stripAll(new String[] {text, ""}); } else { return StringUtils.stripAll(new ... | Adres extends LandelijkOfInstellingEntiteit { public static String[] parseHuisnummerToevoeging(String text) { Pattern pattern = Pattern.compile("([0-9]+)(.*)"); Matcher matcher = pattern.matcher(text); if (!matcher.find()) { return StringUtils.stripAll(new String[] {text, ""}); } else { return StringUtils.stripAll(new ... | Adres extends LandelijkOfInstellingEntiteit { public static String[] parseHuisnummerToevoeging(String text) { Pattern pattern = Pattern.compile("([0-9]+)(.*)"); Matcher matcher = pattern.matcher(text); if (!matcher.find()) { return StringUtils.stripAll(new String[] {text, ""}); } else { return StringUtils.stripAll(new ... | Adres extends LandelijkOfInstellingEntiteit { public static String[] parseHuisnummerToevoeging(String text) { Pattern pattern = Pattern.compile("([0-9]+)(.*)"); Matcher matcher = pattern.matcher(text); if (!matcher.find()) { return StringUtils.stripAll(new String[] {text, ""}); } else { return StringUtils.stripAll(new ... |
@Test public void isSleutelgegeven() { assertTrue(BronWatchList.isSleutelWaarde(new Persoon(), "bsn")); assertTrue(BronWatchList.isSleutelWaarde(new Deelnemer(), "onderwijsnummer")); assertFalse(BronWatchList.isSleutelWaarde(new Deelnemer(), "indicatieGehandicapt")); assertFalse(BronWatchList.isSleutelWaarde(new Deelne... | public static boolean isSleutelWaarde(Entiteit entiteit, String expression) { Class< ? > key = Hibernate.getClass(entiteit); HashMap<String, Property> properties = list.get(key); if (properties != null && properties.containsKey(expression)) { Property property = properties.get(expression); return property.isSleutelGege... | BronWatchList { public static boolean isSleutelWaarde(Entiteit entiteit, String expression) { Class< ? > key = Hibernate.getClass(entiteit); HashMap<String, Property> properties = list.get(key); if (properties != null && properties.containsKey(expression)) { Property property = properties.get(expression); return proper... | BronWatchList { public static boolean isSleutelWaarde(Entiteit entiteit, String expression) { Class< ? > key = Hibernate.getClass(entiteit); HashMap<String, Property> properties = list.get(key); if (properties != null && properties.containsKey(expression)) { Property property = properties.get(expression); return proper... | BronWatchList { public static boolean isSleutelWaarde(Entiteit entiteit, String expression) { Class< ? > key = Hibernate.getClass(entiteit); HashMap<String, Property> properties = list.get(key); if (properties != null && properties.containsKey(expression)) { Property property = properties.get(expression); return proper... | BronWatchList { public static boolean isSleutelWaarde(Entiteit entiteit, String expression) { Class< ? > key = Hibernate.getClass(entiteit); HashMap<String, Property> properties = list.get(key); if (properties != null && properties.containsKey(expression)) { Property property = properties.get(expression); return proper... |
@Test public void testBrin() { assertThat(Brin.testBrincode("00AA"), is(true)); assertThat(Brin.testBrincode("00AA1"), is(true)); assertThat(Brin.testBrincode("00AA01"), is(true)); assertThat(Brin.testBrincode("0011"), is(true)); assertThat(Brin.testBrincode("00110"), is(true)); assertThat(Brin.testBrincode("001101"), ... | public Brin() { } | Brin extends ExterneOrganisatie { public Brin() { } } | Brin extends ExterneOrganisatie { public Brin() { } Brin(); Brin(String brincode); } | Brin extends ExterneOrganisatie { public Brin() { } Brin(); Brin(String brincode); @Exportable String getCode(); void setCode(String brincode); static boolean testBrincode(String brincode); @Override String toString(); void setOnderwijssector(Onderwijssector onderwijssector); Onderwijssector getOnderwijssector(); @Exp... | Brin extends ExterneOrganisatie { public Brin() { } Brin(); Brin(String brincode); @Exportable String getCode(); void setCode(String brincode); static boolean testBrincode(String brincode); @Override String toString(); void setOnderwijssector(Onderwijssector onderwijssector); Onderwijssector getOnderwijssector(); @Exp... |
@Test public void vestigingVolgnummer() { assertThat(new Brin("00AA1").getVestigingsVolgnummer(), is(1)); assertThat(new Brin("00AA01").getVestigingsVolgnummer(), is(1)); assertThat(new Brin("00AA09").getVestigingsVolgnummer(), is(9)); assertNull(new Brin("00AA").getVestigingsVolgnummer()); } | @Exportable public Integer getVestigingsVolgnummer() { String brincode = getCode(); if (brincode != null) { Matcher matcher = BRIN_REGEXP.matcher(brincode); if (!matcher.matches()) { Asserts.fail(brincode + " is geen geldige BRIN code"); } String volgnummer = matcher.group(2); if (volgnummer != null) { return Integer.p... | Brin extends ExterneOrganisatie { @Exportable public Integer getVestigingsVolgnummer() { String brincode = getCode(); if (brincode != null) { Matcher matcher = BRIN_REGEXP.matcher(brincode); if (!matcher.matches()) { Asserts.fail(brincode + " is geen geldige BRIN code"); } String volgnummer = matcher.group(2); if (volg... | Brin extends ExterneOrganisatie { @Exportable public Integer getVestigingsVolgnummer() { String brincode = getCode(); if (brincode != null) { Matcher matcher = BRIN_REGEXP.matcher(brincode); if (!matcher.matches()) { Asserts.fail(brincode + " is geen geldige BRIN code"); } String volgnummer = matcher.group(2); if (volg... | Brin extends ExterneOrganisatie { @Exportable public Integer getVestigingsVolgnummer() { String brincode = getCode(); if (brincode != null) { Matcher matcher = BRIN_REGEXP.matcher(brincode); if (!matcher.matches()) { Asserts.fail(brincode + " is geen geldige BRIN code"); } String volgnummer = matcher.group(2); if (volg... | Brin extends ExterneOrganisatie { @Exportable public Integer getVestigingsVolgnummer() { String brincode = getCode(); if (brincode != null) { Matcher matcher = BRIN_REGEXP.matcher(brincode); if (!matcher.matches()) { Asserts.fail(brincode + " is geen geldige BRIN code"); } String volgnummer = matcher.group(2); if (volg... |
@Test public void valueOfDate2008IsSJ_2008_2009() { Date date = TimeUtil.getInstance().asDate(2008, 11, 20); assertThat(Schooljaar.valueOf(date), is(Schooljaar.valueOf(2008))); } | public static Schooljaar valueOf(Date datum) { int startJaar = bepaalStartJaarVanSchooljaarActiefOpDatum(datum); return valueOf(startJaar); } | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar valueOf(Date datum) { int startJaar = bepaalStartJaarVanSchooljaarActiefOpDatum(datum); return valueOf(startJaar); } } | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar valueOf(Date datum) { int startJaar = bepaalStartJaarVanSchooljaarActiefOpDatum(datum); return valueOf(startJaar); } private Schooljaar(int jaar); private Schooljaar(Date datum); } | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar valueOf(Date datum) { int startJaar = bepaalStartJaarVanSchooljaarActiefOpDatum(datum); return valueOf(startJaar); } private Schooljaar(int jaar); private Schooljaar(Date datum); int getStartJaar(); int ge... | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar valueOf(Date datum) { int startJaar = bepaalStartJaarVanSchooljaarActiefOpDatum(datum); return valueOf(startJaar); } private Schooljaar(int jaar); private Schooljaar(Date datum); int getStartJaar(); int ge... |
@Test public void isAfgelopen() { assertTrue(Schooljaar.valueOf(1990).isAfgelopen()); } | public boolean isAfgelopen() { Date current = TimeUtil.getInstance().currentDate(); return current.after(getEinddatum()); } | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public boolean isAfgelopen() { Date current = TimeUtil.getInstance().currentDate(); return current.after(getEinddatum()); } } | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public boolean isAfgelopen() { Date current = TimeUtil.getInstance().currentDate(); return current.after(getEinddatum()); } private Schooljaar(int jaar); private Schooljaar(Date datum); } | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public boolean isAfgelopen() { Date current = TimeUtil.getInstance().currentDate(); return current.after(getEinddatum()); } private Schooljaar(int jaar); private Schooljaar(Date datum); int getStartJaar(); int getEindJaar(); @Over... | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public boolean isAfgelopen() { Date current = TimeUtil.getInstance().currentDate(); return current.after(getEinddatum()); } private Schooljaar(int jaar); private Schooljaar(Date datum); int getStartJaar(); int getEindJaar(); @Over... |
@Test public void parseAAAA_2009fails() { assertThat(Schooljaar.parse("AAAA/2009"), is(nullValue())); } | public static Schooljaar parse(String value) { Pattern[] patterns = new Pattern[] {officieel, kort}; for (Pattern pattern : patterns) { Matcher matcher = pattern.matcher(value); if (!matcher.matches()) { continue; } String startJaar = matcher.group(1); if (startJaar == null) return null; TimeUtil kalender = TimeUtil.ge... | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar parse(String value) { Pattern[] patterns = new Pattern[] {officieel, kort}; for (Pattern pattern : patterns) { Matcher matcher = pattern.matcher(value); if (!matcher.matches()) { continue; } String startJaar... | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar parse(String value) { Pattern[] patterns = new Pattern[] {officieel, kort}; for (Pattern pattern : patterns) { Matcher matcher = pattern.matcher(value); if (!matcher.matches()) { continue; } String startJaar... | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar parse(String value) { Pattern[] patterns = new Pattern[] {officieel, kort}; for (Pattern pattern : patterns) { Matcher matcher = pattern.matcher(value); if (!matcher.matches()) { continue; } String startJaar... | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar parse(String value) { Pattern[] patterns = new Pattern[] {officieel, kort}; for (Pattern pattern : patterns) { Matcher matcher = pattern.matcher(value); if (!matcher.matches()) { continue; } String startJaar... |
@Test public void parse2008_AAAAfails() { assertThat(Schooljaar.parse("2008/AAAA"), is(nullValue())); } | public static Schooljaar parse(String value) { Pattern[] patterns = new Pattern[] {officieel, kort}; for (Pattern pattern : patterns) { Matcher matcher = pattern.matcher(value); if (!matcher.matches()) { continue; } String startJaar = matcher.group(1); if (startJaar == null) return null; TimeUtil kalender = TimeUtil.ge... | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar parse(String value) { Pattern[] patterns = new Pattern[] {officieel, kort}; for (Pattern pattern : patterns) { Matcher matcher = pattern.matcher(value); if (!matcher.matches()) { continue; } String startJaar... | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar parse(String value) { Pattern[] patterns = new Pattern[] {officieel, kort}; for (Pattern pattern : patterns) { Matcher matcher = pattern.matcher(value); if (!matcher.matches()) { continue; } String startJaar... | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar parse(String value) { Pattern[] patterns = new Pattern[] {officieel, kort}; for (Pattern pattern : patterns) { Matcher matcher = pattern.matcher(value); if (!matcher.matches()) { continue; } String startJaar... | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar parse(String value) { Pattern[] patterns = new Pattern[] {officieel, kort}; for (Pattern pattern : patterns) { Matcher matcher = pattern.matcher(value); if (!matcher.matches()) { continue; } String startJaar... |
@Test public void parse2008A2009fails() { assertThat(Schooljaar.parse("2008A2009"), is(nullValue())); } | public static Schooljaar parse(String value) { Pattern[] patterns = new Pattern[] {officieel, kort}; for (Pattern pattern : patterns) { Matcher matcher = pattern.matcher(value); if (!matcher.matches()) { continue; } String startJaar = matcher.group(1); if (startJaar == null) return null; TimeUtil kalender = TimeUtil.ge... | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar parse(String value) { Pattern[] patterns = new Pattern[] {officieel, kort}; for (Pattern pattern : patterns) { Matcher matcher = pattern.matcher(value); if (!matcher.matches()) { continue; } String startJaar... | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar parse(String value) { Pattern[] patterns = new Pattern[] {officieel, kort}; for (Pattern pattern : patterns) { Matcher matcher = pattern.matcher(value); if (!matcher.matches()) { continue; } String startJaar... | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar parse(String value) { Pattern[] patterns = new Pattern[] {officieel, kort}; for (Pattern pattern : patterns) { Matcher matcher = pattern.matcher(value); if (!matcher.matches()) { continue; } String startJaar... | Schooljaar implements IBeginEinddatumEntiteit, Comparable<Schooljaar>,
Serializable { public static Schooljaar parse(String value) { Pattern[] patterns = new Pattern[] {officieel, kort}; for (Pattern pattern : patterns) { Matcher matcher = pattern.matcher(value); if (!matcher.matches()) { continue; } String startJaar... |
@Test public void testCompare() { String[] strings = new String[] {"1-2", "1-02", "1-20", "10-20", "fred", "jane", "pic01", "pic2", "pic02", "pic02a", "pic3", "pic4", "pic 4 else", "pic 5", "pic 5 something", "pic05", "pic 6", "pic 7", "pic100", "pic100a", "pic120", "pic121", "pic02000", "tom", "x2-g8", "x2-y7", "x2-y0... | @Override public int compare(Object o1, Object o2) { String a = o1.toString(); String b = o2.toString(); int ia = 0, ib = 0; int nza = 0, nzb = 0; char ca, cb; int result; while (true) { nza = nzb = 0; ca = charAt(a, ia); cb = charAt(b, ib); while (Character.isSpaceChar(ca) || ca == '0') { if (ca == '0') { nza++; } els... | NaturalOrderComparator implements Comparator<Object>, Serializable { @Override public int compare(Object o1, Object o2) { String a = o1.toString(); String b = o2.toString(); int ia = 0, ib = 0; int nza = 0, nzb = 0; char ca, cb; int result; while (true) { nza = nzb = 0; ca = charAt(a, ia); cb = charAt(b, ib); while (Ch... | NaturalOrderComparator implements Comparator<Object>, Serializable { @Override public int compare(Object o1, Object o2) { String a = o1.toString(); String b = o2.toString(); int ia = 0, ib = 0; int nza = 0, nzb = 0; char ca, cb; int result; while (true) { nza = nzb = 0; ca = charAt(a, ia); cb = charAt(b, ib); while (Ch... | NaturalOrderComparator implements Comparator<Object>, Serializable { @Override public int compare(Object o1, Object o2) { String a = o1.toString(); String b = o2.toString(); int ia = 0, ib = 0; int nza = 0, nzb = 0; char ca, cb; int result; while (true) { nza = nzb = 0; ca = charAt(a, ia); cb = charAt(b, ib); while (Ch... | NaturalOrderComparator implements Comparator<Object>, Serializable { @Override public int compare(Object o1, Object o2) { String a = o1.toString(); String b = o2.toString(); int ia = 0, ib = 0; int nza = 0, nzb = 0; char ca, cb; int result; while (true) { nza = nzb = 0; ca = charAt(a, ia); cb = charAt(b, ib); while (Ch... |
@Test public void enkelvoudigeExceptie() { NullPointerException e = returnsNullPointerException(); ExceptionUtil.printStackTrace(pw, e); String expected = "java.lang.NullPointerException" + newLine() + "\tat nl.topicus.cobra.util.ExceptionUtilTest.returnsNullPointerException(ExceptionUtilTest.java:25)"; Assert.assertEq... | public static void printStackTrace(PrintWriter pw, Throwable t) { printStackTrace(pw, t, new StackTraceElement[] {}); } | ExceptionUtil { public static void printStackTrace(PrintWriter pw, Throwable t) { printStackTrace(pw, t, new StackTraceElement[] {}); } } | ExceptionUtil { public static void printStackTrace(PrintWriter pw, Throwable t) { printStackTrace(pw, t, new StackTraceElement[] {}); } } | ExceptionUtil { public static void printStackTrace(PrintWriter pw, Throwable t) { printStackTrace(pw, t, new StackTraceElement[] {}); } static String getDescription(Exception exception); static boolean isCausedBy(Throwable exception, Class< ? extends Throwable> cause); static void printStackTrace(PrintWriter pw, Throw... | ExceptionUtil { public static void printStackTrace(PrintWriter pw, Throwable t) { printStackTrace(pw, t, new StackTraceElement[] {}); } static String getDescription(Exception exception); static boolean isCausedBy(Throwable exception, Class< ? extends Throwable> cause); static void printStackTrace(PrintWriter pw, Throw... |
@Test public void returnedWrappedException() { ExceptionUtil.printStackTrace(pw, wrapsAndReturnsException()); String expected = "java.lang.RuntimeException: ROOT Exception" + newLine() + "\tat nl.topicus.cobra.util.ExceptionUtilTest.returnsRuntimeException(ExceptionUtilTest.java:30)\n" + "Wrapped by java.lang.RuntimeEx... | public static void printStackTrace(PrintWriter pw, Throwable t) { printStackTrace(pw, t, new StackTraceElement[] {}); } | ExceptionUtil { public static void printStackTrace(PrintWriter pw, Throwable t) { printStackTrace(pw, t, new StackTraceElement[] {}); } } | ExceptionUtil { public static void printStackTrace(PrintWriter pw, Throwable t) { printStackTrace(pw, t, new StackTraceElement[] {}); } } | ExceptionUtil { public static void printStackTrace(PrintWriter pw, Throwable t) { printStackTrace(pw, t, new StackTraceElement[] {}); } static String getDescription(Exception exception); static boolean isCausedBy(Throwable exception, Class< ? extends Throwable> cause); static void printStackTrace(PrintWriter pw, Throw... | ExceptionUtil { public static void printStackTrace(PrintWriter pw, Throwable t) { printStackTrace(pw, t, new StackTraceElement[] {}); } static String getDescription(Exception exception); static boolean isCausedBy(Throwable exception, Class< ? extends Throwable> cause); static void printStackTrace(PrintWriter pw, Throw... |
@Test public void medewerkerNietInBronScope() { Medewerker medewerker = new Medewerker(); medewerker.setPersoon(new Persoon()); assertFalse(model.isInBronScope(medewerker.getPersoon())); } | public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.getPersoon())) retu... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... |
@Test public void caughtAndWrappedException() { try { wrapsAndThrowsException(); } catch (RuntimeException e) { ExceptionUtil.printStackTrace(pw, e); } String expected = "java.lang.RuntimeException: ROOT Exception" + newLine() + "\tat nl.topicus.cobra.util.ExceptionUtilTest.throwsRuntimeException(ExceptionUtilTest.java... | public static void printStackTrace(PrintWriter pw, Throwable t) { printStackTrace(pw, t, new StackTraceElement[] {}); } | ExceptionUtil { public static void printStackTrace(PrintWriter pw, Throwable t) { printStackTrace(pw, t, new StackTraceElement[] {}); } } | ExceptionUtil { public static void printStackTrace(PrintWriter pw, Throwable t) { printStackTrace(pw, t, new StackTraceElement[] {}); } } | ExceptionUtil { public static void printStackTrace(PrintWriter pw, Throwable t) { printStackTrace(pw, t, new StackTraceElement[] {}); } static String getDescription(Exception exception); static boolean isCausedBy(Throwable exception, Class< ? extends Throwable> cause); static void printStackTrace(PrintWriter pw, Throw... | ExceptionUtil { public static void printStackTrace(PrintWriter pw, Throwable t) { printStackTrace(pw, t, new StackTraceElement[] {}); } static String getDescription(Exception exception); static boolean isCausedBy(Throwable exception, Class< ? extends Throwable> cause); static void printStackTrace(PrintWriter pw, Throw... |
@Test public void testNonZero() { Assert.assertFalse(DecimalUtil.nonZero(null)); Assert.assertFalse(DecimalUtil.nonZero(BigDecimal.ZERO)); Assert.assertTrue(DecimalUtil.nonZero(DecimalUtil.THREE)); } | public static final boolean nonZero(BigDecimal decimal) { return decimal != null && decimal.compareTo(BigDecimal.ZERO) != 0; } | DecimalUtil { public static final boolean nonZero(BigDecimal decimal) { return decimal != null && decimal.compareTo(BigDecimal.ZERO) != 0; } } | DecimalUtil { public static final boolean nonZero(BigDecimal decimal) { return decimal != null && decimal.compareTo(BigDecimal.ZERO) != 0; } } | DecimalUtil { public static final boolean nonZero(BigDecimal decimal) { return decimal != null && decimal.compareTo(BigDecimal.ZERO) != 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final ... | DecimalUtil { public static final boolean nonZero(BigDecimal decimal) { return decimal != null && decimal.compareTo(BigDecimal.ZERO) != 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final ... |
@Test public void testIsZero() { Assert.assertTrue(DecimalUtil.isZero(BigDecimal.ZERO)); Assert.assertFalse(DecimalUtil.isZero(DecimalUtil.THREE)); } | public static final boolean isZero(BigDecimal decimal) { return decimal.compareTo(BigDecimal.ZERO) == 0; } | DecimalUtil { public static final boolean isZero(BigDecimal decimal) { return decimal.compareTo(BigDecimal.ZERO) == 0; } } | DecimalUtil { public static final boolean isZero(BigDecimal decimal) { return decimal.compareTo(BigDecimal.ZERO) == 0; } } | DecimalUtil { public static final boolean isZero(BigDecimal decimal) { return decimal.compareTo(BigDecimal.ZERO) == 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean greaterThan(... | DecimalUtil { public static final boolean isZero(BigDecimal decimal) { return decimal.compareTo(BigDecimal.ZERO) == 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean greaterThan(... |
@Test public void testGreaterThanBigDecimalBigDecimal() { Assert.assertTrue(DecimalUtil.greaterThan(DecimalUtil.SEVEN, DecimalUtil.THREE)); Assert.assertFalse(DecimalUtil.greaterThan(DecimalUtil.TWO, DecimalUtil.EIGHT)); Assert.assertFalse(DecimalUtil.greaterThan(DecimalUtil.SEVEN, DecimalUtil.SEVEN)); } | public static final boolean greaterThan(BigDecimal is, BigDecimal than) { return is.compareTo(than) > 0; } | DecimalUtil { public static final boolean greaterThan(BigDecimal is, BigDecimal than) { return is.compareTo(than) > 0; } } | DecimalUtil { public static final boolean greaterThan(BigDecimal is, BigDecimal than) { return is.compareTo(than) > 0; } } | DecimalUtil { public static final boolean greaterThan(BigDecimal is, BigDecimal than) { return is.compareTo(than) > 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean greaterThan(... | DecimalUtil { public static final boolean greaterThan(BigDecimal is, BigDecimal than) { return is.compareTo(than) > 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean greaterThan(... |
@Test public void testGreaterThanBigDecimalInt() { Assert.assertTrue(DecimalUtil.greaterThan(DecimalUtil.SEVEN, 3)); Assert.assertFalse(DecimalUtil.greaterThan(DecimalUtil.TWO, 8)); Assert.assertFalse(DecimalUtil.greaterThan(DecimalUtil.SEVEN, 7)); } | public static final boolean greaterThan(BigDecimal is, BigDecimal than) { return is.compareTo(than) > 0; } | DecimalUtil { public static final boolean greaterThan(BigDecimal is, BigDecimal than) { return is.compareTo(than) > 0; } } | DecimalUtil { public static final boolean greaterThan(BigDecimal is, BigDecimal than) { return is.compareTo(than) > 0; } } | DecimalUtil { public static final boolean greaterThan(BigDecimal is, BigDecimal than) { return is.compareTo(than) > 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean greaterThan(... | DecimalUtil { public static final boolean greaterThan(BigDecimal is, BigDecimal than) { return is.compareTo(than) > 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean greaterThan(... |
@Test public void testGreaterThanOrEqual() { Assert.assertTrue(DecimalUtil.greaterThanOrEqual(DecimalUtil.SEVEN, 3)); Assert.assertFalse(DecimalUtil.greaterThanOrEqual(DecimalUtil.TWO, 8)); Assert.assertTrue(DecimalUtil.greaterThanOrEqual(DecimalUtil.SEVEN, 7)); } | public static final boolean greaterThanOrEqual(BigDecimal is, int than) { return is.compareTo(BigDecimal.valueOf(than)) >= 0; } | DecimalUtil { public static final boolean greaterThanOrEqual(BigDecimal is, int than) { return is.compareTo(BigDecimal.valueOf(than)) >= 0; } } | DecimalUtil { public static final boolean greaterThanOrEqual(BigDecimal is, int than) { return is.compareTo(BigDecimal.valueOf(than)) >= 0; } } | DecimalUtil { public static final boolean greaterThanOrEqual(BigDecimal is, int than) { return is.compareTo(BigDecimal.valueOf(than)) >= 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final... | DecimalUtil { public static final boolean greaterThanOrEqual(BigDecimal is, int than) { return is.compareTo(BigDecimal.valueOf(than)) >= 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final... |
@Test public void testCompare() { Assert.assertEquals(0, DecimalUtil.compare(null, null)); Assert.assertEquals(-1, DecimalUtil.compare(null, DecimalUtil.SEVEN)); Assert.assertEquals(1, DecimalUtil.compare(DecimalUtil.SEVEN, null)); Assert.assertEquals(0, DecimalUtil.compare(DecimalUtil.SEVEN, DecimalUtil.SEVEN)); Asser... | public static final int compare(BigDecimal one, BigDecimal other) { if (one == null && other == null) return 0; if (one == null) return -1; else if (other == null) return 1; return one.compareTo(other); } | DecimalUtil { public static final int compare(BigDecimal one, BigDecimal other) { if (one == null && other == null) return 0; if (one == null) return -1; else if (other == null) return 1; return one.compareTo(other); } } | DecimalUtil { public static final int compare(BigDecimal one, BigDecimal other) { if (one == null && other == null) return 0; if (one == null) return -1; else if (other == null) return 1; return one.compareTo(other); } } | DecimalUtil { public static final int compare(BigDecimal one, BigDecimal other) { if (one == null && other == null) return 0; if (one == null) return -1; else if (other == null) return 1; return one.compareTo(other); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); s... | DecimalUtil { public static final int compare(BigDecimal one, BigDecimal other) { if (one == null && other == null) return 0; if (one == null) return -1; else if (other == null) return 1; return one.compareTo(other); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); s... |
@Test public void testMax() { Assert.assertEquals(DecimalUtil.FIVE, DecimalUtil.max(DecimalUtil.FIVE, DecimalUtil.FOUR)); Assert.assertEquals(DecimalUtil.FIVE, DecimalUtil.max(DecimalUtil.ONE, DecimalUtil.FIVE)); } | public static final BigDecimal max(BigDecimal one, BigDecimal other) { return (one.compareTo(other) > 0 ? one : other); } | DecimalUtil { public static final BigDecimal max(BigDecimal one, BigDecimal other) { return (one.compareTo(other) > 0 ? one : other); } } | DecimalUtil { public static final BigDecimal max(BigDecimal one, BigDecimal other) { return (one.compareTo(other) > 0 ? one : other); } } | DecimalUtil { public static final BigDecimal max(BigDecimal one, BigDecimal other) { return (one.compareTo(other) > 0 ? one : other); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boole... | DecimalUtil { public static final BigDecimal max(BigDecimal one, BigDecimal other) { return (one.compareTo(other) > 0 ? one : other); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boole... |
@Test public void testMin() { Assert.assertEquals(DecimalUtil.FOUR, DecimalUtil.min(DecimalUtil.FIVE, DecimalUtil.FOUR)); Assert.assertEquals(DecimalUtil.FOUR, DecimalUtil.min(DecimalUtil.FOUR, DecimalUtil.NINE)); } | public static final BigDecimal min(BigDecimal one, BigDecimal other) { return (one.compareTo(other) < 0 ? one : other); } | DecimalUtil { public static final BigDecimal min(BigDecimal one, BigDecimal other) { return (one.compareTo(other) < 0 ? one : other); } } | DecimalUtil { public static final BigDecimal min(BigDecimal one, BigDecimal other) { return (one.compareTo(other) < 0 ? one : other); } } | DecimalUtil { public static final BigDecimal min(BigDecimal one, BigDecimal other) { return (one.compareTo(other) < 0 ? one : other); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boole... | DecimalUtil { public static final BigDecimal min(BigDecimal one, BigDecimal other) { return (one.compareTo(other) < 0 ? one : other); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boole... |
@Test public void testGreaterThanZero() { Assert.assertFalse(DecimalUtil.greaterThanZero(null)); Assert.assertFalse(DecimalUtil.greaterThanZero(BigDecimal.ZERO)); Assert.assertTrue(DecimalUtil.greaterThanZero(DecimalUtil.SEVEN)); } | public static final boolean greaterThanZero(BigDecimal is) { return is != null && is.compareTo(BigDecimal.ZERO) > 0; } | DecimalUtil { public static final boolean greaterThanZero(BigDecimal is) { return is != null && is.compareTo(BigDecimal.ZERO) > 0; } } | DecimalUtil { public static final boolean greaterThanZero(BigDecimal is) { return is != null && is.compareTo(BigDecimal.ZERO) > 0; } } | DecimalUtil { public static final boolean greaterThanZero(BigDecimal is) { return is != null && is.compareTo(BigDecimal.ZERO) > 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean ... | DecimalUtil { public static final boolean greaterThanZero(BigDecimal is) { return is != null && is.compareTo(BigDecimal.ZERO) > 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean ... |
@Test public void ongekoppeldPersoonNietInScope() { assertFalse(model.isInBronScope(new Persoon())); } | public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.getPersoon())) retu... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... |
@Test public void testZeroOrMore() { Assert.assertFalse(DecimalUtil.zeroOrMore(null)); Assert.assertFalse(DecimalUtil.zeroOrMore(BigDecimal.valueOf(-0.01))); Assert.assertTrue(DecimalUtil.zeroOrMore(BigDecimal.ZERO)); Assert.assertTrue(DecimalUtil.zeroOrMore(BigDecimal.valueOf(0.01))); Assert.assertTrue(DecimalUtil.zer... | public static boolean zeroOrMore(BigDecimal decimal) { return decimal != null && decimal.compareTo(BigDecimal.ZERO) >= 0; } | DecimalUtil { public static boolean zeroOrMore(BigDecimal decimal) { return decimal != null && decimal.compareTo(BigDecimal.ZERO) >= 0; } } | DecimalUtil { public static boolean zeroOrMore(BigDecimal decimal) { return decimal != null && decimal.compareTo(BigDecimal.ZERO) >= 0; } } | DecimalUtil { public static boolean zeroOrMore(BigDecimal decimal) { return decimal != null && decimal.compareTo(BigDecimal.ZERO) >= 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boo... | DecimalUtil { public static boolean zeroOrMore(BigDecimal decimal) { return decimal != null && decimal.compareTo(BigDecimal.ZERO) >= 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boo... |
@Test public void testLessThanZero() { Assert.assertFalse(DecimalUtil.lessThanZero(null)); Assert.assertTrue(DecimalUtil.lessThanZero(BigDecimal.valueOf(-0.01))); Assert.assertFalse(DecimalUtil.lessThanZero(BigDecimal.ZERO)); Assert.assertFalse(DecimalUtil.lessThanZero(BigDecimal.valueOf(0.01))); Assert.assertTrue(Deci... | public static final boolean lessThanZero(BigDecimal decimal) { if (decimal == null) return false; return decimal.compareTo(BigDecimal.ZERO) < 0; } | DecimalUtil { public static final boolean lessThanZero(BigDecimal decimal) { if (decimal == null) return false; return decimal.compareTo(BigDecimal.ZERO) < 0; } } | DecimalUtil { public static final boolean lessThanZero(BigDecimal decimal) { if (decimal == null) return false; return decimal.compareTo(BigDecimal.ZERO) < 0; } } | DecimalUtil { public static final boolean lessThanZero(BigDecimal decimal) { if (decimal == null) return false; return decimal.compareTo(BigDecimal.ZERO) < 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal ... | DecimalUtil { public static final boolean lessThanZero(BigDecimal decimal) { if (decimal == null) return false; return decimal.compareTo(BigDecimal.ZERO) < 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal ... |
@Test public void testLessOrEqualtoZero() { Assert.assertFalse(DecimalUtil.lessOrEqualtoZero(null)); Assert.assertTrue(DecimalUtil.lessOrEqualtoZero(BigDecimal.valueOf(-0.01))); Assert.assertTrue(DecimalUtil.lessOrEqualtoZero(BigDecimal.ZERO)); Assert.assertFalse(DecimalUtil.lessOrEqualtoZero(BigDecimal.valueOf(0.01)))... | public static final boolean lessOrEqualtoZero(BigDecimal decimal) { if (decimal == null) return false; return decimal.compareTo(BigDecimal.ZERO) <= 0; } | DecimalUtil { public static final boolean lessOrEqualtoZero(BigDecimal decimal) { if (decimal == null) return false; return decimal.compareTo(BigDecimal.ZERO) <= 0; } } | DecimalUtil { public static final boolean lessOrEqualtoZero(BigDecimal decimal) { if (decimal == null) return false; return decimal.compareTo(BigDecimal.ZERO) <= 0; } } | DecimalUtil { public static final boolean lessOrEqualtoZero(BigDecimal decimal) { if (decimal == null) return false; return decimal.compareTo(BigDecimal.ZERO) <= 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDe... | DecimalUtil { public static final boolean lessOrEqualtoZero(BigDecimal decimal) { if (decimal == null) return false; return decimal.compareTo(BigDecimal.ZERO) <= 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDe... |
@Test public void testLessOrEqual() { Assert.assertTrue(DecimalUtil.lessOrEqual(DecimalUtil.FIVE, 11)); Assert.assertFalse(DecimalUtil.lessOrEqual(DecimalUtil.FIVE, 3)); } | public static final boolean lessOrEqual(BigDecimal decimal, int other) { return decimal.compareTo(BigDecimal.valueOf(other)) <= 0; } | DecimalUtil { public static final boolean lessOrEqual(BigDecimal decimal, int other) { return decimal.compareTo(BigDecimal.valueOf(other)) <= 0; } } | DecimalUtil { public static final boolean lessOrEqual(BigDecimal decimal, int other) { return decimal.compareTo(BigDecimal.valueOf(other)) <= 0; } } | DecimalUtil { public static final boolean lessOrEqual(BigDecimal decimal, int other) { return decimal.compareTo(BigDecimal.valueOf(other)) <= 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static ... | DecimalUtil { public static final boolean lessOrEqual(BigDecimal decimal, int other) { return decimal.compareTo(BigDecimal.valueOf(other)) <= 0; } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static ... |
@Test public void testDivideBigDecimalInt() { Assert.assertEquals(BigDecimal.ZERO, DecimalUtil.divide(BigDecimal.ZERO, 3)); Assert.assertEquals(DecimalUtil.TWO, DecimalUtil.divide(DecimalUtil.EIGHT, 4)); } | public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } } | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } } | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean gr... | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean gr... |
@Test public void testDivideBigDecimalMathContextInt() { MathContext mc = new MathContext(1, RoundingMode.HALF_UP); Assert.assertEquals(DecimalUtil.THREE, DecimalUtil.divide(DecimalUtil.FIVE, mc, 2)); } | public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } } | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } } | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean gr... | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean gr... |
@Test public void testDivideBigDecimalMathContextBigDecimal() { MathContext mc = new MathContext(1, RoundingMode.HALF_UP); Assert.assertEquals(DecimalUtil.THREE, DecimalUtil.divide(DecimalUtil.FIVE, mc, DecimalUtil.TWO)); } | public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } } | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } } | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean gr... | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean gr... |
@Test public void testDivideIntMathContextInt() { MathContext mc = new MathContext(1, RoundingMode.HALF_UP); Assert.assertEquals(DecimalUtil.THREE, DecimalUtil.divide(5, mc, 2)); } | public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } } | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } } | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean gr... | DecimalUtil { public static final BigDecimal divide(BigDecimal decimal, int by) { return decimal.divide(BigDecimal.valueOf(by)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean gr... |
@Test public void testMultiply() { Assert.assertEquals(DecimalUtil.SIX, DecimalUtil.multiply(DecimalUtil.THREE, 2)); } | public static final BigDecimal multiply(BigDecimal decimal, int by) { return decimal.multiply(BigDecimal.valueOf(by)); } | DecimalUtil { public static final BigDecimal multiply(BigDecimal decimal, int by) { return decimal.multiply(BigDecimal.valueOf(by)); } } | DecimalUtil { public static final BigDecimal multiply(BigDecimal decimal, int by) { return decimal.multiply(BigDecimal.valueOf(by)); } } | DecimalUtil { public static final BigDecimal multiply(BigDecimal decimal, int by) { return decimal.multiply(BigDecimal.valueOf(by)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolea... | DecimalUtil { public static final BigDecimal multiply(BigDecimal decimal, int by) { return decimal.multiply(BigDecimal.valueOf(by)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolea... |
@Test public void testValueOf() { Assert.assertEquals(BigDecimal.ZERO, DecimalUtil.valueOf("0")); Assert.assertEquals(BigDecimal.valueOf(0.1), DecimalUtil.valueOf("0.1")); Assert.assertEquals(BigDecimal.valueOf(0.1), DecimalUtil.valueOf("0,1")); Assert.assertEquals(BigDecimal.valueOf(1000.1), DecimalUtil.valueOf("1.000... | public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } } | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } } | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean greaterThan(Bi... | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean greaterThan(Bi... |
@Test public void ongekoppeldAdresNietInScope() { assertFalse(model.isInBronScope(new Adres())); } | public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.getPersoon())) retu... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... | BronEduArteModel { public boolean isInBronScope(Adres adres) { if (adres == null) return false; List<PersoonAdres> persoonAdressen = adres.getPersoonAdressen(); if (persoonAdressen == null || persoonAdressen.isEmpty()) { return false; } for (PersoonAdres persoonAdres : persoonAdressen) { if (isInBronScope(persoonAdres.... |
@Test(expected = IllegalArgumentException.class) public void testValueOfMeerderePuntenEnKommas() { Assert.assertEquals(BigDecimal.ZERO, DecimalUtil.valueOf("0,1,2.3.4")); } | public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } } | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } } | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean greaterThan(Bi... | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean greaterThan(Bi... |
@Test(expected = IllegalArgumentException.class) public void testValueOfMeerdereKommas() { Assert.assertEquals(BigDecimal.ZERO, DecimalUtil.valueOf("0.3,4,5")); } | public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } } | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } } | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean greaterThan(Bi... | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean greaterThan(Bi... |
@Test(expected = IllegalArgumentException.class) public void testValueOfMeerderePunten() { Assert.assertEquals(BigDecimal.ZERO, DecimalUtil.valueOf("0,3.4.5")); } | public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } } | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } } | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean greaterThan(Bi... | DecimalUtil { public static final BigDecimal valueOf(String string) { return new BigDecimal(localizeString(string)); } static final boolean nonZero(BigDecimal decimal); static final boolean isZero(BigDecimal decimal); static final boolean greaterThan(BigDecimal is, BigDecimal than); static final boolean greaterThan(Bi... |
@Test(expected = IllegalArgumentException.class) public void testAssertNotNullMetNull() { Asserts.assertNotNull("foo", null); } | public static void assertNotNull(final String parameter, final Object waarde) { if (log.isDebugEnabled()) { String waardeText = String.valueOf(waarde); waardeText = waardeText.substring(0, Math.min(waardeText.length(), 16)); log.debug("Controleer dat " + parameter + " niet null is, huidige waarde: '" + waardeText + "'"... | Asserts { public static void assertNotNull(final String parameter, final Object waarde) { if (log.isDebugEnabled()) { String waardeText = String.valueOf(waarde); waardeText = waardeText.substring(0, Math.min(waardeText.length(), 16)); log.debug("Controleer dat " + parameter + " niet null is, huidige waarde: '" + waarde... | Asserts { public static void assertNotNull(final String parameter, final Object waarde) { if (log.isDebugEnabled()) { String waardeText = String.valueOf(waarde); waardeText = waardeText.substring(0, Math.min(waardeText.length(), 16)); log.debug("Controleer dat " + parameter + " niet null is, huidige waarde: '" + waarde... | Asserts { public static void assertNotNull(final String parameter, final Object waarde) { if (log.isDebugEnabled()) { String waardeText = String.valueOf(waarde); waardeText = waardeText.substring(0, Math.min(waardeText.length(), 16)); log.debug("Controleer dat " + parameter + " niet null is, huidige waarde: '" + waarde... | Asserts { public static void assertNotNull(final String parameter, final Object waarde) { if (log.isDebugEnabled()) { String waardeText = String.valueOf(waarde); waardeText = waardeText.substring(0, Math.min(waardeText.length(), 16)); log.debug("Controleer dat " + parameter + " niet null is, huidige waarde: '" + waarde... |
@Test public void testAssertNotNullMetNotNull() { Asserts.assertNotNull("foo", new Object()); } | public static void assertNotNull(final String parameter, final Object waarde) { if (log.isDebugEnabled()) { String waardeText = String.valueOf(waarde); waardeText = waardeText.substring(0, Math.min(waardeText.length(), 16)); log.debug("Controleer dat " + parameter + " niet null is, huidige waarde: '" + waardeText + "'"... | Asserts { public static void assertNotNull(final String parameter, final Object waarde) { if (log.isDebugEnabled()) { String waardeText = String.valueOf(waarde); waardeText = waardeText.substring(0, Math.min(waardeText.length(), 16)); log.debug("Controleer dat " + parameter + " niet null is, huidige waarde: '" + waarde... | Asserts { public static void assertNotNull(final String parameter, final Object waarde) { if (log.isDebugEnabled()) { String waardeText = String.valueOf(waarde); waardeText = waardeText.substring(0, Math.min(waardeText.length(), 16)); log.debug("Controleer dat " + parameter + " niet null is, huidige waarde: '" + waarde... | Asserts { public static void assertNotNull(final String parameter, final Object waarde) { if (log.isDebugEnabled()) { String waardeText = String.valueOf(waarde); waardeText = waardeText.substring(0, Math.min(waardeText.length(), 16)); log.debug("Controleer dat " + parameter + " niet null is, huidige waarde: '" + waarde... | Asserts { public static void assertNotNull(final String parameter, final Object waarde) { if (log.isDebugEnabled()) { String waardeText = String.valueOf(waarde); waardeText = waardeText.substring(0, Math.min(waardeText.length(), 16)); log.debug("Controleer dat " + parameter + " niet null is, huidige waarde: '" + waarde... |
@Test(expected = IllegalArgumentException.class) public void testAssertNotEmptyMetEmpty() { Asserts.assertNotEmpty("foo", ""); } | public static void assertNotEmpty(String parameter, Object waarde) { assertNotNull(parameter, waarde); if ("".equals(waarde.toString().trim())) { String bericht = "Parameter " + parameter + " is leeg"; throw new IllegalArgumentException(bericht); } } | Asserts { public static void assertNotEmpty(String parameter, Object waarde) { assertNotNull(parameter, waarde); if ("".equals(waarde.toString().trim())) { String bericht = "Parameter " + parameter + " is leeg"; throw new IllegalArgumentException(bericht); } } } | Asserts { public static void assertNotEmpty(String parameter, Object waarde) { assertNotNull(parameter, waarde); if ("".equals(waarde.toString().trim())) { String bericht = "Parameter " + parameter + " is leeg"; throw new IllegalArgumentException(bericht); } } } | Asserts { public static void assertNotEmpty(String parameter, Object waarde) { assertNotNull(parameter, waarde); if ("".equals(waarde.toString().trim())) { String bericht = "Parameter " + parameter + " is leeg"; throw new IllegalArgumentException(bericht); } } static void assertNotNull(final String parameter, final Ob... | Asserts { public static void assertNotEmpty(String parameter, Object waarde) { assertNotNull(parameter, waarde); if ("".equals(waarde.toString().trim())) { String bericht = "Parameter " + parameter + " is leeg"; throw new IllegalArgumentException(bericht); } } static void assertNotNull(final String parameter, final Ob... |
@Test public void testAssertNotEmptyMetNotEmpty() { Asserts.assertNotEmpty("foo", "123"); } | public static void assertNotEmpty(String parameter, Object waarde) { assertNotNull(parameter, waarde); if ("".equals(waarde.toString().trim())) { String bericht = "Parameter " + parameter + " is leeg"; throw new IllegalArgumentException(bericht); } } | Asserts { public static void assertNotEmpty(String parameter, Object waarde) { assertNotNull(parameter, waarde); if ("".equals(waarde.toString().trim())) { String bericht = "Parameter " + parameter + " is leeg"; throw new IllegalArgumentException(bericht); } } } | Asserts { public static void assertNotEmpty(String parameter, Object waarde) { assertNotNull(parameter, waarde); if ("".equals(waarde.toString().trim())) { String bericht = "Parameter " + parameter + " is leeg"; throw new IllegalArgumentException(bericht); } } } | Asserts { public static void assertNotEmpty(String parameter, Object waarde) { assertNotNull(parameter, waarde); if ("".equals(waarde.toString().trim())) { String bericht = "Parameter " + parameter + " is leeg"; throw new IllegalArgumentException(bericht); } } static void assertNotNull(final String parameter, final Ob... | Asserts { public static void assertNotEmpty(String parameter, Object waarde) { assertNotNull(parameter, waarde); if ("".equals(waarde.toString().trim())) { String bericht = "Parameter " + parameter + " is leeg"; throw new IllegalArgumentException(bericht); } } static void assertNotNull(final String parameter, final Ob... |
@Test public void testAssertMatchesRegExp() { Asserts.assertMatchesRegExp("postcode", "1234 Aa", "[1-9][0-9]{3} ?[a-zA-Z]{2}"); Asserts.assertMatchesRegExp("postcode", "1234Aa", "[1-9][0-9]{3} ?[a-zA-Z]{2}"); Asserts.assertMatchesRegExp("postcode", " 1234 Aa ", "[1-9][0-9]{3} ?[a-zA-Z]{2}"); } | public static void assertMatchesRegExp(String parameter, String value, String regexp) { assertNotNull(parameter, value); assertNotNull("regexp", regexp); Pattern pattern = Pattern.compile(regexp); String trimmedValue = value.trim(); Matcher matcher = pattern.matcher(trimmedValue.subSequence(0, trimmedValue.length())); ... | Asserts { public static void assertMatchesRegExp(String parameter, String value, String regexp) { assertNotNull(parameter, value); assertNotNull("regexp", regexp); Pattern pattern = Pattern.compile(regexp); String trimmedValue = value.trim(); Matcher matcher = pattern.matcher(trimmedValue.subSequence(0, trimmedValue.le... | Asserts { public static void assertMatchesRegExp(String parameter, String value, String regexp) { assertNotNull(parameter, value); assertNotNull("regexp", regexp); Pattern pattern = Pattern.compile(regexp); String trimmedValue = value.trim(); Matcher matcher = pattern.matcher(trimmedValue.subSequence(0, trimmedValue.le... | Asserts { public static void assertMatchesRegExp(String parameter, String value, String regexp) { assertNotNull(parameter, value); assertNotNull("regexp", regexp); Pattern pattern = Pattern.compile(regexp); String trimmedValue = value.trim(); Matcher matcher = pattern.matcher(trimmedValue.subSequence(0, trimmedValue.le... | Asserts { public static void assertMatchesRegExp(String parameter, String value, String regexp) { assertNotNull(parameter, value); assertNotNull("regexp", regexp); Pattern pattern = Pattern.compile(regexp); String trimmedValue = value.trim(); Matcher matcher = pattern.matcher(trimmedValue.subSequence(0, trimmedValue.le... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.