@Test public void testResolveIdFailingCases() { try { underTest.resolveId(caseFail1Dto, String.class); fail(); } catch (BusinessException e) { assertThat(e).isNotNull(); } try { underTest.resolveId(caseFail2Dto, String.class); fail(); } catch (BusinessException e) { assertThat(e).isNotNull(); } try { underTest.resolveId(caseFail3Dto, String.class, 0); fail(); } catch (BusinessException e) { assertThat(e).isNotNull(); } }
@Override public <D, I> I resolveId(D dto, Class<I> aggregateIdClass) { ParameterHolder<D> parameterHolder = getIdParameterHolder(dto, aggregateIdClass); return createIdentifier(aggregateIdClass, parameterHolder.uniqueElement(dto), parameterHolder.parameters(dto)); }
AnnotationDtoInfoResolver extends BaseDtoInfoResolver { @Override public <D, I> I resolveId(D dto, Class<I> aggregateIdClass) { ParameterHolder<D> parameterHolder = getIdParameterHolder(dto, aggregateIdClass); return createIdentifier(aggregateIdClass, parameterHolder.uniqueElement(dto), parameterHolder.parameters(dto)); } }
AnnotationDtoInfoResolver extends BaseDtoInfoResolver { @Override public <D, I> I resolveId(D dto, Class<I> aggregateIdClass) { ParameterHolder<D> parameterHolder = getIdParameterHolder(dto, aggregateIdClass); return createIdentifier(aggregateIdClass, parameterHolder.uniqueElement(dto), parameterHolder.parameters(dto)); } @Inject  AnnotationDtoInfoResolver(DomainRegistry domainRegistry); }
AnnotationDtoInfoResolver extends BaseDtoInfoResolver { @Override public <D, I> I resolveId(D dto, Class<I> aggregateIdClass) { ParameterHolder<D> parameterHolder = getIdParameterHolder(dto, aggregateIdClass); return createIdentifier(aggregateIdClass, parameterHolder.uniqueElement(dto), parameterHolder.parameters(dto)); } @Inject  AnnotationDtoInfoResolver(DomainRegistry domainRegistry); @Override boolean supports(D dto); @Override I resolveId(D dto, Class<I> aggregateIdClass); @Override I resolveId(D dto, Class<I> aggregateIdClass, int position); @Override A resolveAggregate(D dto, Class<A> aggregateRootClass); @Override A resolveAggregate(D dto, Class<A> aggregateRootClass, int position); }
AnnotationDtoInfoResolver extends BaseDtoInfoResolver { @Override public <D, I> I resolveId(D dto, Class<I> aggregateIdClass) { ParameterHolder<D> parameterHolder = getIdParameterHolder(dto, aggregateIdClass); return createIdentifier(aggregateIdClass, parameterHolder.uniqueElement(dto), parameterHolder.parameters(dto)); } @Inject  AnnotationDtoInfoResolver(DomainRegistry domainRegistry); @Override boolean supports(D dto); @Override I resolveId(D dto, Class<I> aggregateIdClass); @Override I resolveId(D dto, Class<I> aggregateIdClass, int position); @Override A resolveAggregate(D dto, Class<A> aggregateRootClass); @Override A resolveAggregate(D dto, Class<A> aggregateRootClass, int position);  }