Skip to content

Commit

Permalink
inject and import dto mappers when used for an entity in tests (#123)
Browse files Browse the repository at this point in the history
closes #105
  • Loading branch information
atomfrede authored Jul 24, 2020
1 parent 54b9d9d commit eedd5c2
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ import java.util.List;
import java.util.UUID;
<%_ } _%>
<%_ if (dto === 'mapstruct') { _%>
import <%= packageName %>.service.dto.<%= asDto(entityClass) %>;
import <%= packageName %>.service.mapper.<%= entityClass %>Mapper;
<%_ } _%>
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
Expand Down Expand Up @@ -287,6 +292,10 @@ public class <%= entityClass %>ResourceIT <% if (databaseType === 'cassandra') {
private static final <%= fieldType %> <%= updatedValueName %> = <%= fieldType %>.<%= enumValue2 %>;
<%_ } } _%>

<%_ if (dto === 'mapstruct') { _%>
@Inject
private <%= entityClass %>Mapper <%= entityInstance %>Mapper;
<%_ } _%>
@Inject
private <%= entityClass %>Repository <%= entityInstance %>Repository;
<%_ if (isUsingMapsId === true && ( dto !== 'mapstruct' && service === 'no')) { _%>
Expand Down

0 comments on commit eedd5c2

Please sign in to comment.