@Test public void shouldPrepareLevelWithEmptyDependenciesWhenNotDefined() { Level level = level().withName("level").build(); PreparedLevel preparedLevel = basicLevelPreparer.prepare(level); assertThat(preparedLevel).hasName("level").hasLevelCreator(null) .hasMatcher(null).hasType(null); }
@Override public PreparedLevel prepare(Level level) { Type<?> type = resolveType(level.getType(), level.getName()); Matcher matcher = resolveMatcher(level.getMatcher(), level.getName()); Function levelCreator = resolveLevelCreator(level.getLevelCreator()); return new PreparedLevel(level.getName(), level.isArray(), type, level.getMatcher(), matcher, levelCreator); }
BasicLevelPreparer implements LevelPreparer { @Override public PreparedLevel prepare(Level level) { Type<?> type = resolveType(level.getType(), level.getName()); Matcher matcher = resolveMatcher(level.getMatcher(), level.getName()); Function levelCreator = resolveLevelCreator(level.getLevelCreator()); return new PreparedLevel(level.getName(), level.isArray(), type, level.getMatcher(), matcher, levelCreator); } }
BasicLevelPreparer implements LevelPreparer { @Override public PreparedLevel prepare(Level level) { Type<?> type = resolveType(level.getType(), level.getName()); Matcher matcher = resolveMatcher(level.getMatcher(), level.getName()); Function levelCreator = resolveLevelCreator(level.getLevelCreator()); return new PreparedLevel(level.getName(), level.isArray(), type, level.getMatcher(), matcher, levelCreator); } BasicLevelPreparer(MatcherRepository matcherRepository, TypeRepository typeRepository, FunctionProvider functionProvider); }
BasicLevelPreparer implements LevelPreparer { @Override public PreparedLevel prepare(Level level) { Type<?> type = resolveType(level.getType(), level.getName()); Matcher matcher = resolveMatcher(level.getMatcher(), level.getName()); Function levelCreator = resolveLevelCreator(level.getLevelCreator()); return new PreparedLevel(level.getName(), level.isArray(), type, level.getMatcher(), matcher, levelCreator); } BasicLevelPreparer(MatcherRepository matcherRepository, TypeRepository typeRepository, FunctionProvider functionProvider); @Override PreparedLevel prepare(Level level); }
BasicLevelPreparer implements LevelPreparer { @Override public PreparedLevel prepare(Level level) { Type<?> type = resolveType(level.getType(), level.getName()); Matcher matcher = resolveMatcher(level.getMatcher(), level.getName()); Function levelCreator = resolveLevelCreator(level.getLevelCreator()); return new PreparedLevel(level.getName(), level.isArray(), type, level.getMatcher(), matcher, levelCreator); } BasicLevelPreparer(MatcherRepository matcherRepository, TypeRepository typeRepository, FunctionProvider functionProvider); @Override PreparedLevel prepare(Level level);  }