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;
020import static de.cuioss.tools.collect.CollectionLiterals.immutableList;
021
022import de.cuioss.test.generator.TypedGenerator;
023import lombok.AccessLevel;
024import lombok.RequiredArgsConstructor;
025
026/**
027 * The generator {@link #READABLE} is for visual mocks, {@link #UNIT_TESTS} for
028 * unit-tests.
029 *
030 */
031@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
032public enum OrganizationNameGenerator {
033
034    /** The 25 largest fictional companies */
035    READABLE(fixedValues(immutableList("CHOAM", "Acme Corp.", "Sirius Cybernetics Corp.", "MomCorp", "Rich Industries",
036            "Soylent Corp.", "Very Big Corp. of America", "Frobozz Magic Co.", "Warbucks Industries", "Tyrell Corp.",
037            "Wayne Enterprises", "Virtucon", "Globex", "Umbrella Corp.", "Wonka Industries", "Stark Industries",
038            "Clampett Oil", "Oceanic Airlines", "Yoyodyne Propulsion Sys.", "Cyberdyne Systems Corp.",
039            "d’Anconia Copper", "Gringotts", "Oscorp", "Nakatomi Trading Corp.", "Spacely Space Sprockets"))),
040
041    /** Technical String for unit-testing. Min size is 1, max size 256 */
042    UNIT_TESTS(strings(1, 256));
043
044    private final TypedGenerator<String> generator;
045
046    /**
047     * @return the concrete generator.
048     */
049    public TypedGenerator<String> generator() {
050        return generator;
051    }
052}