@Test public void createProjectionReturnsProjectionOfArgument() { var projection = Integer.class; var given = "Given"; var expected = 1337; given(projectionFactoryMock.createProjection(projection, given)).willReturn(expected); var actual = baseProjectionFactory.createProjection(given, projection); assertThat(actual).isEqualTo(expected); }
public <T> T createProjection(@NotNull Object object, @NotNull Class<T> projectionType) { return projectionFactory.createProjection(projectionType, object); }
BaseProjectionFactory { public <T> T createProjection(@NotNull Object object, @NotNull Class<T> projectionType) { return projectionFactory.createProjection(projectionType, object); } }
BaseProjectionFactory { public <T> T createProjection(@NotNull Object object, @NotNull Class<T> projectionType) { return projectionFactory.createProjection(projectionType, object); } @Autowired  BaseProjectionFactory(ProjectionFactory projectionFactory, UserAuthService userAuthService); }
BaseProjectionFactory { public <T> T createProjection(@NotNull Object object, @NotNull Class<T> projectionType) { return projectionFactory.createProjection(projectionType, object); } @Autowired  BaseProjectionFactory(ProjectionFactory projectionFactory, UserAuthService userAuthService); T createProjection(@NotNull Object object, @NotNull Class<T> projectionType); List<T> createProjections(@NotNull Collection<?> objects, @NotNull Class<T> projectionType); Object createProjectionForAuthenticatedUser(@NotNull Object object, @NotNull Class<?> normalProjectionType, @NotNull Class<?> managerProjectionType); List<?> createProjectionsForAuthenticatedUser(@NotNull Collection<?> objects, @NotNull Class<?> normalProjectionType, @NotNull Class<?> managerProjectionType); Page<?> createProjectionsForAuthenticatedUser(@NotNull Page<?> page, @NotNull Class<?> normalProjectionType, @NotNull Class<?> managerProjectionType); }
BaseProjectionFactory { public <T> T createProjection(@NotNull Object object, @NotNull Class<T> projectionType) { return projectionFactory.createProjection(projectionType, object); } @Autowired  BaseProjectionFactory(ProjectionFactory projectionFactory, UserAuthService userAuthService); T createProjection(@NotNull Object object, @NotNull Class<T> projectionType); List<T> createProjections(@NotNull Collection<?> objects, @NotNull Class<T> projectionType); Object createProjectionForAuthenticatedUser(@NotNull Object object, @NotNull Class<?> normalProjectionType, @NotNull Class<?> managerProjectionType); List<?> createProjectionsForAuthenticatedUser(@NotNull Collection<?> objects, @NotNull Class<?> normalProjectionType, @NotNull Class<?> managerProjectionType); Page<?> createProjectionsForAuthenticatedUser(@NotNull Page<?> page, @NotNull Class<?> normalProjectionType, @NotNull Class<?> managerProjectionType);  }