001/*
002 * Copyright 2023 the original author or authors.
003 * <p>
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 * <p>
008 * https://www.apache.org/licenses/LICENSE-2.0
009 * <p>
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package de.cuioss.test.generator.domain;
017
018import static de.cuioss.test.generator.Generators.fixedValues;
019import static de.cuioss.test.generator.Generators.strings;
020
021import de.cuioss.test.generator.TypedGenerator;
022import lombok.AccessLevel;
023import lombok.RequiredArgsConstructor;
024
025/**
026 * The generator {@link #READABLE} is for visual mocks, {@link #UNIT_TESTS} for
027 * unit-tests.
028 *
029 */
030@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
031public enum TitleGenerator {
032
033    /** Some Titles */
034    READABLE(fixedValues("Dr.", "Dr. h.c.", "M.A.", "Dr. med.")),
035
036    /** Technical String for unit-testing. Min size is 1, max size 256 */
037    UNIT_TESTS(strings(1, 10));
038
039    private final TypedGenerator<String> generator;
040
041    /**
042     * @return the concrete generator.
043     */
044    public TypedGenerator<String> generator() {
045        return generator;
046    }
047}