-
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add address module * add git submodule initialization in github workflow
- Loading branch information
1 parent
7a8044d
commit 1c5317e
Showing
48 changed files
with
1,792 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
|
||
#include "types/Country.h" | ||
|
||
namespace faker | ||
{ | ||
class Location | ||
{ | ||
public: | ||
/** | ||
* @brief Returns a random country name. | ||
* | ||
* @returns Country name. | ||
* | ||
* @code | ||
* Location::country() // "Poland" | ||
* @endcode | ||
*/ | ||
static std::string country(); | ||
|
||
/** | ||
* @brief Returns a random USA state. | ||
* | ||
* @returns USA state. | ||
* | ||
* @code | ||
* Location::state() // "Arizona" | ||
* @endcode | ||
*/ | ||
static std::string state(); | ||
|
||
/** | ||
* @brief Returns a random city for given country. | ||
* | ||
* @param country The country to generate city from. Defaults to `Country::Usa`. | ||
* | ||
* @returns City. | ||
* | ||
* @code | ||
* Location::city() // "Boston" | ||
* @endcode | ||
*/ | ||
static std::string city(Country country = Country::Usa); | ||
|
||
/** | ||
* @brief Returns a random zip code for given country. | ||
* | ||
* @param country The country to generate zip code from. Defaults to `Country::Usa`. | ||
* | ||
* @returns Zip code. | ||
* | ||
* @code | ||
* Location::zipCode() // "47683-9880" | ||
* Location::zipCode(Country::Poland) // "31-881" | ||
* @endcode | ||
*/ | ||
static std::string zipCode(Country country = Country::Usa); | ||
|
||
/** | ||
* @brief Returns a random street address for given country. | ||
* | ||
* @param country The country to generate street address from. Defaults to `Country::Usa`. | ||
* | ||
* @returns Street address including building number and street name. | ||
* | ||
* @code | ||
* Location::streetAddress() // "34830 Erdman Hollow" | ||
* @endcode | ||
*/ | ||
static std::string streetAddress(Country country = Country::Usa); | ||
|
||
/** | ||
* @brief Returns a random street for given country. | ||
* | ||
* @param country The country to generate street from. Defaults to `Country::Usa`. | ||
* | ||
* @returns Street name. | ||
* | ||
* @code | ||
* Location::street() // "Schroeder Isle" | ||
* @endcode | ||
*/ | ||
static std::string street(Country country = Country::Usa); | ||
|
||
/** | ||
* @brief Returns a random building number for given country. | ||
* | ||
* @param country The country to generate building number from. Defaults to `Country::Usa`. | ||
* | ||
* @returns Building number. | ||
* | ||
* @code | ||
* Location::buildingNumber() // "505" | ||
* @endcode | ||
*/ | ||
static std::string buildingNumber(Country country = Country::Usa); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include <vector> | ||
|
||
namespace faker | ||
{ | ||
enum class BicCountry | ||
{ | ||
Poland, | ||
}; | ||
|
||
const std::vector<BicCountry> supportedBicCountries{BicCountry::Poland}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ namespace faker | |
{ | ||
enum class Country | ||
{ | ||
Usa, | ||
Poland, | ||
France, | ||
Germany, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#pragma once | ||
|
||
#include <vector> | ||
|
||
namespace faker | ||
{ | ||
enum class IbanCountry | ||
{ | ||
Poland, | ||
France, | ||
Germany, | ||
Italy | ||
}; | ||
|
||
const std::vector<IbanCountry> supportedIbanCountries{IbanCountry::Poland, IbanCountry::France, IbanCountry::Germany, | ||
IbanCountry::Italy}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include "include/faker-cxx/Book.h" | ||
#include "faker-cxx/Book.h" | ||
|
||
#include "gtest/gtest.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include "include/faker-cxx/Color.h" | ||
#include "faker-cxx/Color.h" | ||
|
||
#include "gtest/gtest.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include "include/faker-cxx/Commerce.h" | ||
#include "faker-cxx/Commerce.h" | ||
|
||
#include "gtest/gtest.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.