diff --git a/include/faker-cxx/Company.h b/include/faker-cxx/Company.h index e6d86bcb3..ed7be44c3 100644 --- a/include/faker-cxx/Company.h +++ b/include/faker-cxx/Company.h @@ -2,130 +2,126 @@ #include -namespace faker +namespace faker::company { -class Company -{ -public: - /** - * @brief Returns a random company name. - * - * @returns Company name. - * - * @code - * Company::name() // "Adams Inc" - * @endcode - */ - static std::string name(); +/** + * @brief Returns a random company name. + * + * @returns Company name. + * + * @code + * company::name() // "Adams Inc" + * @endcode + */ +std::string name(); - /** - * @brief Returns a random company type. - * - * @returns Company type. - * - * @code - * Company::type() // "Nonprofit" - * @endcode - */ - static std::string_view type(); +/** + * @brief Returns a random company type. + * + * @returns Company type. + * + * @code + * company::type() // "Nonprofit" + * @endcode + */ +std::string_view type(); - /** - * @brief Returns a random company industry. - * - * @returns Company industry. - * - * @code - * Company::industry() // "Biotechnology" - * @endcode - */ - static std::string_view industry(); +/** + * @brief Returns a random company industry. + * + * @returns Company industry. + * + * @code + * company::industry() // "Biotechnology" + * @endcode + */ +std::string_view industry(); - /** - * @brief Returns a random buzz phrase. - * - * @returns Buzz phrase. - * - * @code - * Company::buzzPhrase() // "cultivate synergistic e-market" - * @endcode - */ - static std::string buzzPhrase(); +/** + * @brief Returns a random buzz phrase. + * + * @returns Buzz phrase. + * + * @code + * company::buzzPhrase() // "cultivate synergistic e-market" + * @endcode + */ +std::string buzzPhrase(); - /** - * @brief Returns a random buzz adjective. - * - * @returns Buzz adjective. - * - * @code - * Company::buzzAdjective() // "one-to-one" - * @endcode - */ - static std::string_view buzzAdjective(); +/** + * @brief Returns a random buzz adjective. + * + * @returns Buzz adjective. + * + * @code + * company::buzzAdjective() // "one-to-one" + * @endcode + */ +std::string_view buzzAdjective(); - /** - * @brief Returns a random buzz noun. - * - * @returns Buzz noun. - * - * @code - * Company::buzzNoun() // "paradigms" - * @endcode - */ - static std::string_view buzzNoun(); +/** + * @brief Returns a random buzz noun. + * + * @returns Buzz noun. + * + * @code + * company::buzzNoun() // "paradigms" + * @endcode + */ +std::string_view buzzNoun(); - /** - * @brief Returns a random buzz verb. - * - * @returns Buzz verb. - * - * @code - * Company::buzzVerb() // "empower" - * @endcode - */ - static std::string_view buzzVerb(); +/** + * @brief Returns a random buzz verb. + * + * @returns Buzz verb. + * + * @code + * company::buzzVerb() // "empower" + * @endcode + */ +std::string_view buzzVerb(); - /** - * @brief Returns a random catch phrase. - * - * @returns Catch phrase. - * - * @code - * Company::catchPhrase() // "Upgradable systematic flexibility" - * @endcode - */ - static std::string catchPhrase(); +/** + * @brief Returns a random catch phrase. + * + * @returns Catch phrase. + * + * @code + * company::catchPhrase() // "Upgradable systematic flexibility" + * @endcode + */ +std::string catchPhrase(); - /** - * @brief Returns a random catch phrase adjective. - * - * @returns Catch phrase adjective. - * - * @code - * Company::catchPhraseAdjective() // "Multi-tiered" - * @endcode - */ - static std::string_view catchPhraseAdjective(); +/** + * @brief Returns a random catch phrase adjective. + * + * @returns Catch phrase adjective. + * + * @code + * company::catchPhraseAdjective() // "Multi-tiered" + * @endcode + */ +std::string_view catchPhraseAdjective(); - /** - * @brief Returns a random catch phrase descriptor. - * - * @returns Catch phrase descriptor. - * - * @code - * Company::catchPhraseDescriptor() // "composite" - * @endcode - */ - static std::string_view catchPhraseDescriptor(); +/** + * @brief Returns a random catch phrase descriptor. + * + * @returns Catch phrase descriptor. + * + * @code + * company::catchPhraseDescriptor() // "composite" + * @endcode + */ +std::string_view catchPhraseDescriptor(); - /** - * @brief Returns a random catch phrase noun. - * - * @returns Catch phrase noun. - * - * @code - * Company::catchPhraseNoun() // "leverage" - * @endcode - */ - static std::string_view catchPhraseNoun(); -}; +/** + * @brief Returns a random catch phrase noun. + * + * @returns Catch phrase noun. + * + * @code + * company::catchPhraseNoun() // "leverage" + * @endcode + */ +std::string_view catchPhraseNoun(); } diff --git a/src/modules/company/Company.cpp b/src/modules/company/Company.cpp index f227f1e0f..5f0a6d582 100644 --- a/src/modules/company/Company.cpp +++ b/src/modules/company/Company.cpp @@ -9,9 +9,9 @@ #include "faker-cxx/Number.h" #include "faker-cxx/Person.h" -namespace faker +namespace faker::company { -std::string Company::name() +std::string name() { std::string companyName; @@ -36,52 +36,52 @@ std::string Company::name() return companyName; } -std::string_view Company::type() +std::string_view type() { return Helper::arrayElement(companyTypes); } -std::string_view Company::industry() +std::string_view industry() { return Helper::arrayElement(companyIndustries); } -std::string Company::buzzPhrase() +std::string buzzPhrase() { return FormatHelper::format("{} {} {}", buzzVerb(), buzzAdjective(), buzzNoun()); } -std::string_view Company::buzzAdjective() +std::string_view buzzAdjective() { return Helper::arrayElement(buzzAdjectives); } -std::string_view Company::buzzNoun() +std::string_view buzzNoun() { return Helper::arrayElement(buzzNouns); } -std::string_view Company::buzzVerb() +std::string_view buzzVerb() { return Helper::arrayElement(buzzVerbs); } -std::string Company::catchPhrase() +std::string catchPhrase() { return FormatHelper::format("{} {} {}", catchPhraseAdjective(), catchPhraseDescriptor(), catchPhraseNoun()); } -std::string_view Company::catchPhraseAdjective() +std::string_view catchPhraseAdjective() { return Helper::arrayElement(catchPhraseAdjectives); } -std::string_view Company::catchPhraseDescriptor() +std::string_view catchPhraseDescriptor() { return Helper::arrayElement(catchPhraseDescriptors); } -std::string_view Company::catchPhraseNoun() +std::string_view catchPhraseNoun() { return Helper::arrayElement(catchPhraseNouns); } diff --git a/src/modules/company/CompanyData.cpp b/src/modules/company/CompanyData.cpp index 8fae11e69..3d122b6cf 100644 --- a/src/modules/company/CompanyData.cpp +++ b/src/modules/company/CompanyData.cpp @@ -3,586 +3,604 @@ #include #include -namespace faker +namespace faker::company { -const std::array buzzAdjectives = {"clicks-and-mortar", - "value-added", - "vertical", - "proactive", - "robust", - "revolutionary", - "scalable", - "leading-edge", - "innovative", - "intuitive", - "strategic", - "e-business", - "mission-critical", - "sticky", - "one-to-one", - "24/7", - "end-to-end", - "global", - "B2B", - "B2C", - "granular", - "frictionless", - "virtual", - "viral", - "dynamic", - "24/365", - "best-of-breed", - "killer", - "magnetic", - "bleeding-edge", - "web-enabled", - "interactive", - "dot-com", - "sexy", - "back-end", - "real-time", - "efficient", - "front-end", - "distributed", - "seamless", - "extensible", - "turn-key", - "world-class", - "open-source", - "cross-platform", - "cross-media", - "synergistic", - "bricks-and-clicks", - "out-of-the-box", - "enterprise", - "integrated", - "impactful", - "wireless", - "transparent", - "next-generation", - "cutting-edge", - "user-centric", - "visionary", - "customized", - "ubiquitous", - "plug-and-play", - "collaborative", - "compelling", - "holistic", - "rich"}; +const std::array buzzAdjectives = { + "clicks-and-mortar", + "value-added", + "vertical", + "proactive", + "robust", + "revolutionary", + "scalable", + "leading-edge", + "innovative", + "intuitive", + "strategic", + "e-business", + "mission-critical", + "sticky", + "one-to-one", + "24/7", + "end-to-end", + "global", + "B2B", + "B2C", + "granular", + "frictionless", + "virtual", + "viral", + "dynamic", + "24/365", + "best-of-breed", + "killer", + "magnetic", + "bleeding-edge", + "web-enabled", + "interactive", + "dot-com", + "sexy", + "back-end", + "real-time", + "efficient", + "front-end", + "distributed", + "seamless", + "extensible", + "turn-key", + "world-class", + "open-source", + "cross-platform", + "cross-media", + "synergistic", + "bricks-and-clicks", + "out-of-the-box", + "enterprise", + "integrated", + "impactful", + "wireless", + "transparent", + "next-generation", + "cutting-edge", + "user-centric", + "visionary", + "customized", + "ubiquitous", + "plug-and-play", + "collaborative", + "compelling", + "holistic", + "rich", +}; -const std::array buzzNouns = {"synergies", - "paradigms", - "markets", - "partnerships", - "infrastructures", - "platforms", - "initiatives", - "channels", - "eyeballs", - "communities", - "ROI", - "solutions", - "action-items", - "portals", - "niches", - "technologies", - "content", - "supply-chains", - "convergence", - "relationships", - "architectures", - "interfaces", - "e-markets", - "e-commerce", - "systems", - "bandwidth", - "models", - "mindshare", - "deliverables", - "users", - "schemas", - "networks", - "applications", - "metrics", - "e-business", - "functionalities", - "experiences", - "web services", - "methodologies", - "blockchains" - "lifetime value"}; +const std::array buzzNouns = { + "synergies", + "paradigms", + "markets", + "partnerships", + "infrastructures", + "platforms", + "initiatives", + "channels", + "eyeballs", + "communities", + "ROI", + "solutions", + "action-items", + "portals", + "niches", + "technologies", + "content", + "supply-chains", + "convergence", + "relationships", + "architectures", + "interfaces", + "e-markets", + "e-commerce", + "systems", + "bandwidth", + "models", + "mindshare", + "deliverables", + "users", + "schemas", + "networks", + "applications", + "metrics", + "e-business", + "functionalities", + "experiences", + "web services", + "methodologies", + "blockchains" + "lifetime value", +}; const std::array buzzVerbs = { - "implement", "utilize", "integrate", "streamline", "optimize", "evolve", "transform", - "embrace", "enable", "orchestrate", "leverage", "reinvent", "aggregate", "architect", - "enhance", "incentivize", "morph", "empower", "envisioneer", "monetize", "harness", - "facilitate", "seize", "disintermediate", "synergize", "strategize", "deploy", "brand", - "grow", "target", "syndicate", "synthesize", "deliver", "mesh", "incubate", - "engage", "maximize", "benchmark", "expedite", "reintermediate", "whiteboard", "visualize", - "repurpose", "innovate", "scale", "unleash", "drive", "extend", "engineer", - "revolutionize", "generate", "exploit", "transition", "e-enable", "iterate", "cultivate", - "matrix", "productize", "redefine", "recontextualize"}; + "implement", "utilize", "integrate", "streamline", "optimize", "evolve", "transform", + "embrace", "enable", "orchestrate", "leverage", "reinvent", "aggregate", "architect", + "enhance", "incentivize", "morph", "empower", "envisioneer", "monetize", "harness", + "facilitate", "seize", "disintermediate", "synergize", "strategize", "deploy", "brand", + "grow", "target", "syndicate", "synthesize", "deliver", "mesh", "incubate", + "engage", "maximize", "benchmark", "expedite", "reintermediate", "whiteboard", "visualize", + "repurpose", "innovate", "scale", "unleash", "drive", "extend", "engineer", + "revolutionize", "generate", "exploit", "transition", "e-enable", "iterate", "cultivate", + "matrix", "productize", "redefine", +}; -const std::array catchPhraseAdjectives = {"Adaptive", - "Advanced", - "Ameliorated", - "Assimilated", - "Automated", - "Balanced", - "Business-focused", - "Centralized", - "Cloned", - "Compatible", - "Configurable", - "Cross-group", - "Cross-platform", - "Customer-focused", - "Customizable", - "Decentralized", - "De-engineered", - "Devolved", - "Digitized", - "Distributed", - "Diverse", - "Down-sized", - "Enhanced", - "Enterprise-wide", - "Ergonomic", - "Exclusive", - "Expanded", - "Extended", - "Face to face", - "Focused", - "Front-line", - "Fully-configurable", - "Function-based", - "Fundamental", - "Future-proofed", - "Grass-roots", - "Horizontal", - "Implemented", - "Innovative", - "Integrated", - "Intuitive", - "Inverse", - "Managed", - "Mandatory", - "Monitored", - "Multi-channelled", - "Multi-lateral", - "Multi-layered", - "Multi-tiered", - "Networked", - "Object-based", - "Open-architected", - "Open-source", - "Operative", - "Optimized", - "Optional", - "Organic", - "Organized", - "Persevering", - "Persistent", - "Phased", - "Polarised", - "Pre-emptive", - "Proactive", - "Profit-focused", - "Profound", - "Programmable", - "Progressive", - "Public-key", - "Quality-focused", - "Reactive", - "Realigned", - "Re-contextualized", - "Re-engineered", - "Reduced", - "Reverse-engineered", - "Right-sized", - "Robust", - "Seamless", - "Secured", - "Self-enabling", - "Sharable", - "Stand-alone", - "Streamlined", - "Switchable", - "Synchronised", - "Synergistic", - "Synergized", - "Team-oriented", - "Total", - "Triple-buffered", - "Universal", - "Up-sized", - "Upgradable", - "User-centric", - "User-friendly", - "Versatile", - "Virtual", - "Visionary", - "Vision-oriented"}; +const std::array catchPhraseAdjectives = { + "Adaptive", + "Advanced", + "Ameliorated", + "Assimilated", + "Automated", + "Balanced", + "Business-focused", + "Centralized", + "Cloned", + "Compatible", + "Configurable", + "Cross-group", + "Cross-platform", + "Customer-focused", + "Customizable", + "Decentralized", + "De-engineered", + "Devolved", + "Digitized", + "Distributed", + "Diverse", + "Down-sized", + "Enhanced", + "Enterprise-wide", + "Ergonomic", + "Exclusive", + "Expanded", + "Extended", + "Face to face", + "Focused", + "Front-line", + "Fully-configurable", + "Function-based", + "Fundamental", + "Future-proofed", + "Grass-roots", + "Horizontal", + "Implemented", + "Innovative", + "Integrated", + "Intuitive", + "Inverse", + "Managed", + "Mandatory", + "Monitored", + "Multi-channelled", + "Multi-lateral", + "Multi-layered", + "Multi-tiered", + "Networked", + "Object-based", + "Open-architected", + "Open-source", + "Operative", + "Optimized", + "Optional", + "Organic", + "Organized", + "Persevering", + "Persistent", + "Phased", + "Polarised", + "Pre-emptive", + "Proactive", + "Profit-focused", + "Profound", + "Programmable", + "Progressive", + "Public-key", + "Quality-focused", + "Reactive", + "Realigned", + "Re-contextualized", + "Re-engineered", + "Reduced", + "Reverse-engineered", + "Right-sized", + "Robust", + "Seamless", + "Secured", + "Self-enabling", + "Sharable", + "Stand-alone", + "Streamlined", + "Switchable", + "Synchronised", + "Synergistic", + "Synergized", + "Team-oriented", + "Total", + "Triple-buffered", + "Universal", + "Up-sized", + "Upgradable", + "User-centric", + "User-friendly", + "Versatile", + "Virtual", + "Visionary", + "Vision-oriented", +}; -const std::array catchPhraseDescriptors = {"24 hour", - "24/7", - "3rd generation", - "4th generation", - "5th generation", - "6th generation", - "actuating", - "analyzing", - "asymmetric", - "asynchronous", - "attitude-oriented", - "background", - "bandwidth-monitored", - "bi-directional", - "bifurcated", - "bottom-line", - "clear-thinking", - "client-driven", - "client-server", - "coherent", - "cohesive", - "composite", - "context-sensitive", - "contextually-based", - "content-based", - "dedicated", - "demand-driven", - "didactic", - "directional", - "discrete", - "disintermediate", - "dynamic", - "eco-centric", - "empowering", - "encompassing", - "even-keeled", - "executive", - "explicit", - "exuding", - "fault-tolerant", - "foreground", - "fresh-thinking", - "full-range", - "global", - "grid-enabled", - "heuristic", - "high-level", - "holistic", - "homogeneous", - "human-resource", - "hybrid", - "impactful", - "incremental", - "intangible", - "interactive", - "intermediate", - "leading edge", - "local", - "logistical", - "maximized", - "methodical", - "mission-critical", - "mobile", - "modular", - "motivating", - "multimedia", - "multi-state", - "multi-tasking", - "national", - "needs-based", - "neutral", - "next generation", - "non-volatile", - "object-oriented", - "optimal", - "optimizing", - "radical", - "real-time", - "reciprocal", - "regional", - "responsive", - "scalable", - "secondary", - "solution-oriented", - "stable", - "static", - "systematic", - "systemic", - "system-worthy", - "tangible", - "tertiary", - "transitional", - "uniform", - "upward-trending", - "user-facing", - "value-added", - "web-enabled", - "well-modulated", - "zero administration", - "zero defect", - "zero tolerance"}; +const std::array catchPhraseDescriptors = { + "24 hour", + "24/7", + "3rd generation", + "4th generation", + "5th generation", + "6th generation", + "actuating", + "analyzing", + "asymmetric", + "asynchronous", + "attitude-oriented", + "background", + "bandwidth-monitored", + "bi-directional", + "bifurcated", + "bottom-line", + "clear-thinking", + "client-driven", + "client-server", + "coherent", + "cohesive", + "composite", + "context-sensitive", + "contextually-based", + "content-based", + "dedicated", + "demand-driven", + "didactic", + "directional", + "discrete", + "disintermediate", + "dynamic", + "eco-centric", + "empowering", + "encompassing", + "even-keeled", + "executive", + "explicit", + "exuding", + "fault-tolerant", + "foreground", + "fresh-thinking", + "full-range", + "global", + "grid-enabled", + "heuristic", + "high-level", + "holistic", + "homogeneous", + "human-resource", + "hybrid", + "impactful", + "incremental", + "intangible", + "interactive", + "intermediate", + "leading edge", + "local", + "logistical", + "maximized", + "methodical", + "mission-critical", + "mobile", + "modular", + "motivating", + "multimedia", + "multi-state", + "multi-tasking", + "national", + "needs-based", + "neutral", + "next generation", + "non-volatile", + "object-oriented", + "optimal", + "optimizing", + "radical", + "real-time", + "reciprocal", + "regional", + "responsive", + "scalable", + "secondary", + "solution-oriented", + "stable", + "static", + "systematic", + "systemic", + "system-worthy", + "tangible", + "tertiary", + "transitional", + "uniform", + "upward-trending", + "user-facing", + "value-added", + "web-enabled", + "well-modulated", + "zero administration", + "zero defect", + "zero tolerance", +}; -const std::array catchPhraseNouns = {"ability", - "access", - "adapter", - "algorithm", - "alliance", - "analyzer", - "application", - "approach", - "architecture", - "archive", - "artificial intelligence", - "array", - "attitude", - "benchmark", - "budgetary management", - "capability", - "capacity", - "challenge", - "circuit", - "collaboration", - "complexity", - "concept", - "conglomeration", - "contingency", - "core", - "customer loyalty", - "database", - "data-warehouse", - "definition", - "emulation", - "encoding", - "encryption", - "extranet", - "firmware", - "flexibility", - "focus group", - "forecast", - "frame", - "framework", - "function", - "functionalities", - "Graphic Interface", - "groupware", - "Graphical User Interface", - "hardware", - "help-desk", - "hierarchy", - "hub", - "implementation", - "info-mediaries", - "infrastructure", - "initiative", - "installation", - "instruction set", - "interface", - "internet solution", - "intranet", - "knowledge user", - "knowledge base", - "local area network", - "leverage", - "matrices", - "matrix", - "methodology", - "middleware", - "migration", - "model", - "moderator", - "monitoring", - "moratorium", - "neural-net", - "open architecture", - "open system", - "orchestration", - "paradigm", - "parallelism", - "policy", - "portal", - "pricing structure", - "process improvement", - "product", - "productivity", - "project", - "projection", - "protocol", - "secured line", - "service-desk", - "software", - "solution", - "standardization", - "strategy", - "structure", - "success", - "superstructure", - "support", - "synergy", - "system engine", - "task-force", - "throughput", - "time-frame", - "toolset", - "utilisation", - "website", - "workforce"}; +const std::array catchPhraseNouns = { + "ability", + "access", + "adapter", + "algorithm", + "alliance", + "analyzer", + "application", + "approach", + "architecture", + "archive", + "artificial intelligence", + "array", + "attitude", + "benchmark", + "budgetary management", + "capability", + "capacity", + "challenge", + "circuit", + "collaboration", + "complexity", + "concept", + "conglomeration", + "contingency", + "core", + "customer loyalty", + "database", + "data-warehouse", + "definition", + "emulation", + "encoding", + "encryption", + "extranet", + "firmware", + "flexibility", + "focus group", + "forecast", + "frame", + "framework", + "function", + "functionalities", + "Graphic Interface", + "groupware", + "Graphical User Interface", + "hardware", + "help-desk", + "hierarchy", + "hub", + "implementation", + "info-mediaries", + "infrastructure", + "initiative", + "installation", + "instruction set", + "interface", + "internet solution", + "intranet", + "knowledge user", + "knowledge base", + "local area network", + "leverage", + "matrices", + "matrix", + "methodology", + "middleware", + "migration", + "model", + "moderator", + "monitoring", + "moratorium", + "neural-net", + "open architecture", + "open system", + "orchestration", + "paradigm", + "parallelism", + "policy", + "portal", + "pricing structure", + "process improvement", + "product", + "productivity", + "project", + "projection", + "protocol", + "secured line", + "service-desk", + "software", + "solution", + "standardization", + "strategy", + "structure", + "success", + "superstructure", + "support", + "synergy", + "system engine", + "task-force", + "throughput", + "time-frame", + "toolset", + "utilisation", + "website", + "workforce", +}; const std::array companyTypes = { "Public Company", "Educational Institution", "Self-Employed", "Government Agency", - "Nonprofit", "Sole Proprietorship", "Privately Held", "Partnership"}; + "Nonprofit", "Sole Proprietorship", "Privately Held", "Partnership", +}; -const std::array companyIndustries = {"Defense & Space", - "Computer Hardware", - "Computer Software", - "Computer Networking", - "Internet", - "Semiconductors", - "Telecommunications", - "Law Practice", - "Legal Services", - "Management Consulting", - "Biotechnology", - "Medical Practice", - "Hospital & Health Care", - "Pharmaceuticals", - "Veterinary", - "Medical Devices", - "Cosmetics", - "Apparel & Fashion", - "Sporting Goods", - "Tobacco", - "Supermarkets", - "Food Production", - "Consumer Electronics", - "Consumer Goods", - "Furniture", - "Retail", - "Entertainment", - "Gambling & Casinos", - "Leisure, Travel & Tourism", - "Hospitality", - "Restaurants", - "Sports", - "Food & Beverages", - "Motion Pictures and Film", - "Broadcast Media", - "Museums and Institutions", - "Fine Art", - "Performing Arts", - "Recreational Facilities and Services", - "Banking", - "Insurance", - "Financial Services", - "Real Estate", - "Investment Banking", - "Investment Management", - "Accounting", - "Construction", - "Building Materials", - "Architecture & Planning", - "Civil Engineering", - "Aviation & Aerospace", - "Automotive", - "Chemicals", - "Machinery", - "Mining & Metals", - "Oil & Energy", - "Shipbuilding", - "Utilities", - "Textiles", - "Paper & Forest Products", - "Railroad Manufacture", - "Farming", - "Ranching", - "Dairy", - "Fishery", - "Primary / Secondary Education", - "Higher Education", - "Education Management", - "Research", - "Military", - "Legislative Office", - "Judiciary", - "International Affairs", - "Government Administration", - "Executive Office", - "Law Enforcement", - "Public Safety", - "Public Policy", - "Marketing and Advertising", - "Newspapers", - "Publishing", - "Printing", - "Information Services", - "Libraries", - "Environmental Services", - "Package / Freight Delivery", - "Individual & Family Services", - "Religious Institutions", - "Civic & Social Organization", - "Consumer Services", - "Transportationg / Trucking / Railroad", - "Warehousing", - "Airlines / Aviation", - "Maritime", - "Information Technology and Services", - "Market Research", - "Public Relations and Communications", - "Design", - "Nonprofit Organization Management", - "Fund-Raising", - "Program Development", - "Writing and Editing", - "Staffing and Recruiting", - "Professional Training & Coaching", - "Venture Capital & Private Equity", - "Political Organization", - "Translation and Localization", - "Computer Games", - "Events Services", - "Arts and Crafts", - "Electrical / Electronic Manufacturing", - "Online Media", - "Nanotechnology", - "Music", - "Logistics and Supply Chain", - "Plastics", - "Computer & Network Security", - "Wireless", - "Alternative Dispute Resolution", - "Security and Investigations", - "Facilities Services", - "Outsourcing / Offshoring", - "Health, Wellness and Fitness", - "Alternative Medicine", - "Media Production", - "Animation", - "Commercial Real Estate", - "Capital Markets", - "Think Tanks", - "Philanthropy", - "E-Learning", - "Wholesale", - "Import and Export", - "Mechanical or Industrial Engineering", - "Photography", - "Human Resources", - "Business Supplies and Equipment", - "Mental Health Care", - "Graphic Design", - "International Trade and Development", - "Wine and Spirits", - "Luxury Goods & Jewelry", - "Renewables & Environment", - "Glass, Ceramics & Concrete", - "Packaging and Containers", - "Industrial Automation", - "Government Relations"}; +const std::array companyIndustries = { + "Defense & Space", + "Computer Hardware", + "Computer Software", + "Computer Networking", + "Internet", + "Semiconductors", + "Telecommunications", + "Law Practice", + "Legal Services", + "Management Consulting", + "Biotechnology", + "Medical Practice", + "Hospital & Health Care", + "Pharmaceuticals", + "Veterinary", + "Medical Devices", + "Cosmetics", + "Apparel & Fashion", + "Sporting Goods", + "Tobacco", + "Supermarkets", + "Food Production", + "Consumer Electronics", + "Consumer Goods", + "Furniture", + "Retail", + "Entertainment", + "Gambling & Casinos", + "Leisure, Travel & Tourism", + "Hospitality", + "Restaurants", + "Sports", + "Food & Beverages", + "Motion Pictures and Film", + "Broadcast Media", + "Museums and Institutions", + "Fine Art", + "Performing Arts", + "Recreational Facilities and Services", + "Banking", + "Insurance", + "Financial Services", + "Real Estate", + "Investment Banking", + "Investment Management", + "Accounting", + "Construction", + "Building Materials", + "Architecture & Planning", + "Civil Engineering", + "Aviation & Aerospace", + "Automotive", + "Chemicals", + "Machinery", + "Mining & Metals", + "Oil & Energy", + "Shipbuilding", + "Utilities", + "Textiles", + "Paper & Forest Products", + "Railroad Manufacture", + "Farming", + "Ranching", + "Dairy", + "Fishery", + "Primary / Secondary Education", + "Higher Education", + "Education Management", + "Research", + "Military", + "Legislative Office", + "Judiciary", + "International Affairs", + "Government Administration", + "Executive Office", + "Law Enforcement", + "Public Safety", + "Public Policy", + "Marketing and Advertising", + "Newspapers", + "Publishing", + "Printing", + "Information Services", + "Libraries", + "Environmental Services", + "Package / Freight Delivery", + "Individual & Family Services", + "Religious Institutions", + "Civic & Social Organization", + "Consumer Services", + "Transportationg / Trucking / Railroad", + "Warehousing", + "Airlines / Aviation", + "Maritime", + "Information Technology and Services", + "Market Research", + "Public Relations and Communications", + "Design", + "Nonprofit Organization Management", + "Fund-Raising", + "Program Development", + "Writing and Editing", + "Staffing and Recruiting", + "Professional Training & Coaching", + "Venture Capital & Private Equity", + "Political Organization", + "Translation and Localization", + "Computer Games", + "Events Services", + "Arts and Crafts", + "Electrical / Electronic Manufacturing", + "Online Media", + "Nanotechnology", + "Music", + "Logistics and Supply Chain", + "Plastics", + "Computer & Network Security", + "Wireless", + "Alternative Dispute Resolution", + "Security and Investigations", + "Facilities Services", + "Outsourcing / Offshoring", + "Health, Wellness and Fitness", + "Alternative Medicine", + "Media Production", + "Animation", + "Commercial Real Estate", + "Capital Markets", + "Think Tanks", + "Philanthropy", + "E-Learning", + "Wholesale", + "Import and Export", + "Mechanical or Industrial Engineering", + "Photography", + "Human Resources", + "Business Supplies and Equipment", + "Mental Health Care", + "Graphic Design", + "International Trade and Development", + "Wine and Spirits", + "Luxury Goods & Jewelry", + "Renewables & Environment", + "Glass, Ceramics & Concrete", + "Packaging and Containers", + "Industrial Automation", + "Government Relations", +}; -const std::array companySuffixes = {"Inc", "LLC", "Group"}; +const std::array companySuffixes = { + "Inc", + "LLC", + "Group", +}; } diff --git a/src/modules/company/CompanyData.h b/src/modules/company/CompanyData.h index 1c53c328b..ad413dc24 100644 --- a/src/modules/company/CompanyData.h +++ b/src/modules/company/CompanyData.h @@ -3,7 +3,7 @@ #include #include -namespace faker +namespace faker::company { extern const std::array buzzAdjectives; extern const std::array buzzNouns; diff --git a/tests/modules/company/CompanyTest.cpp b/tests/modules/company/CompanyTest.cpp index 538288165..22e7a328d 100644 --- a/tests/modules/company/CompanyTest.cpp +++ b/tests/modules/company/CompanyTest.cpp @@ -12,6 +12,7 @@ using namespace ::testing; using namespace faker; +using namespace faker::company; class CompanyTest : public Test { @@ -20,7 +21,7 @@ class CompanyTest : public Test TEST_F(CompanyTest, shouldGenerateCompanyName) { - const auto companyName = Company::name(); + const auto companyName = name(); const auto companyNameElements = StringHelper::split(companyName, " "); @@ -71,7 +72,7 @@ TEST_F(CompanyTest, shouldGenerateCompanyName) TEST_F(CompanyTest, shouldGenerateCompanyType) { - const auto generatedCompanyType = Company::type(); + const auto generatedCompanyType = type(); ASSERT_TRUE(std::ranges::any_of(companyTypes, [generatedCompanyType](const std::string_view& companyType) { return companyType == generatedCompanyType; })); @@ -79,7 +80,7 @@ TEST_F(CompanyTest, shouldGenerateCompanyType) TEST_F(CompanyTest, shouldGenerateCompanyIndustry) { - const auto generatedCompanyIndustry = Company::industry(); + const auto generatedCompanyIndustry = industry(); ASSERT_TRUE(std::ranges::any_of(companyIndustries, [generatedCompanyIndustry](const std::string_view& companyIndustry) @@ -88,19 +89,19 @@ TEST_F(CompanyTest, shouldGenerateCompanyIndustry) TEST_F(CompanyTest, shouldGenerateBuzzPhrase) { - const auto buzzPhrase = Company::buzzPhrase(); - - ASSERT_TRUE(std::ranges::any_of(buzzVerbs, [buzzPhrase](const std::string_view& buzzVerb) - { return buzzPhrase.find(buzzVerb) != std::string::npos; })); - ASSERT_TRUE(std::ranges::any_of(buzzAdjectives, [buzzPhrase](const std::string_view& buzzAdjective) - { return buzzPhrase.find(buzzAdjective) != std::string::npos; })); - ASSERT_TRUE(std::ranges::any_of(buzzNouns, [buzzPhrase](const std::string_view& buzzNoun) - { return buzzPhrase.find(buzzNoun) != std::string::npos; })); + const auto generatedBuzzPhrase = buzzPhrase(); + + ASSERT_TRUE(std::ranges::any_of(buzzVerbs, [generatedBuzzPhrase](const std::string_view& buzzVerb) + { return generatedBuzzPhrase.find(buzzVerb) != std::string::npos; })); + ASSERT_TRUE(std::ranges::any_of(buzzAdjectives, [generatedBuzzPhrase](const std::string_view& buzzAdjective) + { return generatedBuzzPhrase.find(buzzAdjective) != std::string::npos; })); + ASSERT_TRUE(std::ranges::any_of(buzzNouns, [generatedBuzzPhrase](const std::string_view& buzzNoun) + { return generatedBuzzPhrase.find(buzzNoun) != std::string::npos; })); } TEST_F(CompanyTest, shouldGenerateBuzzVerb) { - const auto generatedBuzzVerb = Company::buzzVerb(); + const auto generatedBuzzVerb = buzzVerb(); ASSERT_TRUE(std::ranges::any_of(buzzVerbs, [generatedBuzzVerb](const std::string_view& buzzVerb) { return buzzVerb == generatedBuzzVerb; })); @@ -108,7 +109,7 @@ TEST_F(CompanyTest, shouldGenerateBuzzVerb) TEST_F(CompanyTest, shouldGenerateBuzzAdjective) { - const auto generatedBuzzAdjective = Company::buzzAdjective(); + const auto generatedBuzzAdjective = buzzAdjective(); ASSERT_TRUE(std::ranges::any_of(buzzAdjectives, [generatedBuzzAdjective](const std::string_view& buzzAdjective) { return buzzAdjective == generatedBuzzAdjective; })); @@ -116,7 +117,7 @@ TEST_F(CompanyTest, shouldGenerateBuzzAdjective) TEST_F(CompanyTest, shouldGenerateBuzzNoun) { - const auto generatedBuzzNoun = Company::buzzNoun(); + const auto generatedBuzzNoun = buzzNoun(); ASSERT_TRUE(std::ranges::any_of(buzzNouns, [generatedBuzzNoun](const std::string_view& buzzNoun) { return buzzNoun == generatedBuzzNoun; })); @@ -124,19 +125,21 @@ TEST_F(CompanyTest, shouldGenerateBuzzNoun) TEST_F(CompanyTest, shouldGenerateCatchPhrase) { - const auto catchPhrase = Company::catchPhrase(); - - ASSERT_TRUE(std::ranges::any_of(catchPhraseAdjectives, [catchPhrase](const std::string_view& catchPhraseAdjective) - { return catchPhrase.find(catchPhraseAdjective) != std::string::npos; })); - ASSERT_TRUE(std::ranges::any_of(catchPhraseDescriptors, [catchPhrase](const std::string_view& catchPhraseDescriptor) - { return catchPhrase.find(catchPhraseDescriptor) != std::string::npos; })); - ASSERT_TRUE(std::ranges::any_of(catchPhraseNouns, [catchPhrase](const std::string_view& catchPhraseNoun) - { return catchPhrase.find(catchPhraseNoun) != std::string::npos; })); + const auto generatedCatchPhrase = catchPhrase(); + + ASSERT_TRUE(std::ranges::any_of(catchPhraseAdjectives, + [generatedCatchPhrase](const std::string_view& catchPhraseAdjective) + { return generatedCatchPhrase.find(catchPhraseAdjective) != std::string::npos; })); + ASSERT_TRUE(std::ranges::any_of(catchPhraseDescriptors, + [generatedCatchPhrase](const std::string_view& catchPhraseDescriptor) + { return generatedCatchPhrase.find(catchPhraseDescriptor) != std::string::npos; })); + ASSERT_TRUE(std::ranges::any_of(catchPhraseNouns, [generatedCatchPhrase](const std::string_view& catchPhraseNoun) + { return generatedCatchPhrase.find(catchPhraseNoun) != std::string::npos; })); } TEST_F(CompanyTest, shouldGenerateCatchPhraseAdjective) { - const auto generatedCatchPhraseAdjective = Company::catchPhraseAdjective(); + const auto generatedCatchPhraseAdjective = catchPhraseAdjective(); ASSERT_TRUE(std::ranges::any_of(catchPhraseAdjectives, [generatedCatchPhraseAdjective](const std::string_view& catchPhraseAdjective) @@ -145,7 +148,7 @@ TEST_F(CompanyTest, shouldGenerateCatchPhraseAdjective) TEST_F(CompanyTest, shouldGenerateCatchPhraseDescriptor) { - const auto generatedCatchPhraseDescriptor = Company::catchPhraseDescriptor(); + const auto generatedCatchPhraseDescriptor = catchPhraseDescriptor(); ASSERT_TRUE(std::ranges::any_of(catchPhraseDescriptors, [generatedCatchPhraseDescriptor](const std::string_view& catchPhraseDescriptor) @@ -154,7 +157,7 @@ TEST_F(CompanyTest, shouldGenerateCatchPhraseDescriptor) TEST_F(CompanyTest, shouldGenerateCatchPhraseNoun) { - const auto generatedCatchPhraseNoun = Company::catchPhraseNoun(); + const auto generatedCatchPhraseNoun = catchPhraseNoun(); ASSERT_TRUE(std::ranges::any_of(catchPhraseNouns, [generatedCatchPhraseNoun](const std::string_view& catchPhraseNoun)